syntheticaFX.jar
is the base for all themes and covers additional controls and panels for your
JavaFX application. Each theme is provided as a separate jar file. So for using a SyntheticaFX theme you have to add at least two libraries to
your project - the core library and the required theme library.
SyntheticaFX
which is responsible for loading and initializing. To apply a theme simply create
a new instance and initialize on application startup just like in the example below.
public class Demo extends Application {
@Override
public void start(Stage primaryStage){
new SyntheticaFXStandard().init();
...
SyntheticaFX also provides a theme which extends the default theme of JavaFX (Modena). The extension covers all required CSS for SyntheticaFX specific
components like window decoration, dialogs, validation, TitledBorderPane etc. So if you want to use Modena together with SyntheticaFX simply initialize
your application with the SyntheticaFXModena
theme.
public class Demo extends Application {
@Override
public void start(Stage primaryStage){
new SyntheticaFXModena().init();
...
Note: It's essential to integrate a SyntheticaFX RootPane
to your application to benefit from all features. For this simply
wrap the RootPane
around the content together with the related stage as parameter. By applying the settings below your application appears
in a complete new look.
public class Demo extends Application {
@Override
public void start(Stage primaryStage){
new SyntheticaFXStandard().init();
//Scene scene = new Scene(createContent(), 800, 600);
Scene scene = new Scene(new RootPane(primaryStage, createContent()), 800, 600);
primaryStage.setScene(scene);
primaryStage.setTitle("SyntheticaFX Demo");
primaryStage.show();
}
...
This is how the application looks with the JavaFX/Modena based theme - SyntheticaFXModena.