-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
393a08d
commit 2f28a7c
Showing
7 changed files
with
56 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ | |
requires java.desktop; | ||
|
||
exports net.logandhillon.icx; | ||
exports net.logandhillon.icx.ui to javafx.graphics; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package net.logandhillon.icx.ui; | ||
|
||
import javafx.application.Application; | ||
import javafx.scene.Scene; | ||
import javafx.stage.Stage; | ||
import net.logandhillon.icx.ui.view.LoginView; | ||
import org.apache.logging.log4j.Logger; | ||
import org.apache.logging.log4j.core.LoggerContext; | ||
|
||
public class UI extends Application { | ||
private static final Logger LOG = LoggerContext.getContext().getLogger(UI.class); | ||
public static Stage stage; | ||
|
||
@Override | ||
public void start(Stage stage) { | ||
UI.stage = stage; | ||
LOG.info("Initializing UI views"); | ||
Scene scene = new Scene(new LoginView()); | ||
stage.setTitle("ICX"); | ||
stage.setScene(scene); | ||
stage.show(); | ||
} | ||
|
||
public static void startClient() { | ||
LOG.info("Starting ICX client"); | ||
launch(); | ||
} | ||
|
||
public static void reloadScene(Scene newScene, Runnable silentAction) { | ||
stage.close(); | ||
silentAction.run(); | ||
stage.setScene(newScene); | ||
stage.show(); | ||
} | ||
|
||
public static void reloadScene(Scene newScene) { | ||
stage.close(); | ||
stage.setScene(newScene); | ||
stage.show(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters