- java.lang.Object
-
- javafx.application.Application
-
- io.github.mmm.ui.fx.FxApplication
-
- All Implemented Interfaces:
UiApplication
public abstract class FxApplication extends javafx.application.Application implements UiApplication
Base class for you main application to build your client with JavaFx.
Example:public class MyFxApp extends
FxApplication
{ public void start() { MyApp myApp = new MyApp(); myApp.run(); } public static void main(String[] args) { Application.launch(MyFxApp.class, args); } }- Since:
- 1.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static String
CSS_LOCATION
Location of the stylesheet (CSS file) to style all JavaFx stages.
-
Constructor Summary
Constructors Constructor Description FxApplication()
The constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FxApplication
get()
javafx.stage.Stage
getPrimaryStage()
void
start(javafx.stage.Stage fxPrimaryStage)
-
Methods inherited from class javafx.application.Application
getHostServices, getParameters, getUserAgentStylesheet, init, launch, launch, notifyPreloader, setUserAgentStylesheet, stop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.github.mmm.ui.api.UiApplication
start
-
-
-
-
Field Detail
-
CSS_LOCATION
public static final String CSS_LOCATION
Location of the stylesheet (CSS file) to style all JavaFx stages. Add this to you app and declare it as open module so it can be properly loaded and resolved.- See Also:
- Constant Field Values
-
-
Method Detail
-
start
public final void start(javafx.stage.Stage fxPrimaryStage) throws Exception
- Specified by:
start
in classjavafx.application.Application
- Throws:
Exception
-
getPrimaryStage
public javafx.stage.Stage getPrimaryStage()
- Returns:
- the primary
Stage
.
-
get
public static FxApplication get()
- Returns:
- the running
FxApplication
instance.
-
-