The default StageFactory implementation.
The Java FX-based implementation of the WindowManager interface.
The Java FX-based implementation of the WindowManager interface.
This class creates Stage instances wrapped by Java FX-specific implementations of the Window interface. Stages can be used for all types of windows supported by the JGUIraffe library. Note that internal frames are not really supported; they are simulated by regular stages which are parents of the top-level stage.
Because CSS style sheets are managed by Scene objects and these scenes are created together with stages, this class is also responsible for adding custom CSS style sheet URLs. For this purpose, an instance of StyleSheetProvider has to be passed to the constructor. All style sheet URLs defined by this instance are added to all newly created scenes.
A trait for creating new JavaFX Stage objects.
A trait for creating new JavaFX Stage objects.
This trait defines a method for creating a new Stage. It is used by JavaFxWindowManager in order to create the underlying stages for JGUIraffe window objects.
It is possible to replace the standard implementation of this trait, so that the creation of stages can be fully customized by an application.
1.3.1
A class for providing CSS style sheets to be applied to newly created Scene objects.
A class for providing CSS style sheets to be applied to newly created Scene objects.
An instance of this class is expected by the constructor of net.sf.jguiraffe.gui.platform.javafx.builder.window.JavaFxWindowManager. The style sheet URLs managed by this instance are applied to each Scene object created by the window manager.
The JGUIraffe JavaFX integration comes with one standard style sheet. In addition, applications can add an arbitrary number of style sheet files. Style sheets provided by the application can be passed as a comma-separated list to the constructor. The standard style sheet is defined via a separate constructor argument containing the name of the corresponding class path resource. If the constructor is used that only takes the string list of application-defined style sheets, the name of the standard style sheet is set automatically. The purpose of this design is to allow an easy customization in JGUIraffe applications:
In order to add application-specific style sheets, applications typically override the standard declaration of this bean with their own one. They can then configure the additional style sheets directly in their own builder script by collecting invocations of the <di:resource> tag in a variable. This variable can be referenced in the declaration for the custom StyleSheetProvider bean. The single-argument constructor should be used to keep the standard style sheet.
If the standard style sheet is to be replaced, the constructor accepting two arguments is to be called. Typically, the second argument is set to null, meaning that this style sheet is to be ignored. The corresponding classes to be adapted can then be defined by one of the application-specific style sheets.
The companion object of StageFactory.
Companion object.
The default StageFactory implementation.
This class implements the creation of JavaFX Stage objects which can be assigned to JGUIraffe windows. It integrates window creation with the Java FX application framework: It fires up a simple application just to obtain the primary stage. This stage is stored and returned as the first stage object queried by a client. Further invocations of the factory result in newly created Stage objects.
New instances can be created using the apply() method of the companion object. Here the dummy JavaFX application is started, and the primary stage is obtained. Alternatively, the primary stage can be obtained using a custom approach. Then instances can be created using the constructor and passing in the primary stage.
1.3.1