Frequently Asked Questions
General
Window Decoration
Customization
General
1. How do I integrate and enable SyntheticaFX in my application?
Make sure that the core library syntheticafx.jar is in your classpath.
Additionally add all theme libraries to your classpath which you want to use.
Call SyntheticaFX#init to initialize the required theme on application startup - in
case you want to use a different theme please take a look at the README.txt file
of the downloaded theme. Additionally you have to set a
RootPane
as root
node just like in the example below. The RootPane
acts as a wrapper for the
content.
SyntheticaFX.init("com.jyloo.syntheticafx.SyntheticaFXStandard"); ... Parent content = createContent(); Scene scene = new Scene(new RootPane(stage, content));
Window Decoration
1. How can I enable native window decoration?
The SyntheticaFX window decoration is enabled by default. To enable the native decoration
of the OS the fourth parameter of the
RootPane
has to be to true
.
SyntheticaFX.init("com.jyloo.syntheticafx.SyntheticaFXStandard"); Scene scene = new Scene(new RootPane(stage, createContentPane(), true, true), 800, 600);
2. How can I completely remove the window decoration?
To window decoration will not appear if the third parameter of the
RootPane
is set to false
. The example below demonstrates how to remove the window decoration.
SyntheticaFX.init("com.jyloo.syntheticafx.SyntheticaFXModena"); Scene scene = new Scene(new RootPane(stage, createContentPane(), false, false));
Customization
1. How can I customize an existing SyntheticaFX therme?
Each SyntheticaFX theme comes along with one or more CSS files. To provide additional
styles you can implement
SyntheticaFX#loadCssExtension()
and add
one or more custom CSS files.
new SyntheticaFXStandard(){ @Override protected void loadCssExtension() { addCss("/com/company/css/custom.css"); }; }.init();