Class AbstractScene
- java.lang.Object
-
- pro.gravit.launcher.client.gui.raw.AbstractScene
-
- All Implemented Interfaces:
AllowDisable
- Direct Known Subclasses:
ConsoleScene,LoginScene,ServerMenuScene
public abstract class AbstractScene extends java.lang.Object implements AllowDisable
-
-
Field Summary
Fields Modifier and Type Field Description protected JavaFXApplicationapplicationprotected ContextHelpercontextHelperjava.lang.StringfxmlPathprotected pro.gravit.launcher.LauncherConfiglauncherConfigprotected javafx.scene.Scenescene
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractScene(java.lang.String fxmlPath, JavaFXApplication application)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddisable()protected abstract voiddoInit()protected voiddoShow()voidenable()abstract voiderrorHandle(java.lang.Throwable e)static voidfade(javafx.scene.Node region, double delay, double from, double to, javafx.event.EventHandler<javafx.event.ActionEvent> onFinished)AbstractOverlaygetCurrentOverlay()protected AbstractStagegetCurrentStage()javafx.scene.ScenegetScene()voidhideOverlay(double delay, javafx.event.EventHandler<javafx.event.ActionEvent> onFinished)voidinit()booleanisEnabled()protected <T extends pro.gravit.launcher.request.WebSocketEvent>
voidprocessRequest(java.lang.String message, pro.gravit.launcher.request.Request<T> request, java.util.function.Consumer<T> onSuccess, javafx.event.EventHandler<javafx.event.ActionEvent> onError)abstract voidreset()protected voidsceneBaseInit(javafx.scene.Node node)voidshowOverlay(AbstractOverlay overlay, javafx.event.EventHandler<javafx.event.ActionEvent> onFinished)
-
-
-
Field Detail
-
fxmlPath
public final java.lang.String fxmlPath
-
application
protected final JavaFXApplication application
-
launcherConfig
protected final pro.gravit.launcher.LauncherConfig launcherConfig
-
contextHelper
protected final ContextHelper contextHelper
-
scene
protected javafx.scene.Scene scene
-
-
Constructor Detail
-
AbstractScene
protected AbstractScene(java.lang.String fxmlPath, JavaFXApplication application)
-
-
Method Detail
-
fade
public static void fade(javafx.scene.Node region, double delay, double from, double to, javafx.event.EventHandler<javafx.event.ActionEvent> onFinished)
-
getCurrentStage
protected AbstractStage getCurrentStage()
-
init
public void init() throws java.lang.Exception- Throws:
java.lang.Exception
-
doInit
protected abstract void doInit() throws java.lang.Exception- Throws:
java.lang.Exception
-
showOverlay
public void showOverlay(AbstractOverlay overlay, javafx.event.EventHandler<javafx.event.ActionEvent> onFinished)
-
hideOverlay
public void hideOverlay(double delay, javafx.event.EventHandler<javafx.event.ActionEvent> onFinished)
-
processRequest
protected final <T extends pro.gravit.launcher.request.WebSocketEvent> void processRequest(java.lang.String message, pro.gravit.launcher.request.Request<T> request, java.util.function.Consumer<T> onSuccess, javafx.event.EventHandler<javafx.event.ActionEvent> onError)
-
getCurrentOverlay
public AbstractOverlay getCurrentOverlay()
-
disable
public void disable()
- Specified by:
disablein interfaceAllowDisable
-
enable
public void enable()
- Specified by:
enablein interfaceAllowDisable
-
isEnabled
public boolean isEnabled()
-
doShow
protected void doShow()
-
reset
public abstract void reset()
-
errorHandle
public abstract void errorHandle(java.lang.Throwable e)
-
getScene
public javafx.scene.Scene getScene()
-
sceneBaseInit
protected void sceneBaseInit(javafx.scene.Node node)
-
-