FXWindowFramer: revamp your window frames using JavaFX...
At a glance...
Most developer’s wish list probably hosts the idea of exploring new ways of decorating his/her applications window... Of course, preferences of current OSes do propose a few options, but some may want more, or different choices, would it just be to frame their apps with their own uniform “branded” style.
FXWindowFramer is a quite simple JavaFX library, which may be used, out of the box, to change the look&feel of a JavaFX application main window (applying just a few cosmetic changes through CSS definitions), or, as a starting point prototype, to investigate more advanced, or very different alternatives...
To keep things simple and the prototype easy to understand, FXWindowFramer only touches the application window frame (borders and nameplate), and only supports, as such, desktop applications that do not need resizing. The goal is : Keep the painting intact, but change that frame!
Window borders changes investigated here:
• width;
• corners rounding;
• color.
Concerning the Title bar and usual buttons:
• buttons presence (only Exit and Minimize, spread apart from each other);
• colors and fonts.
A detailed presentation of FXWindowFramer may be found in the companion document "Vade Mecum.pdf", including Nodes root architecture and screen shots... The same documents gives also hints concerning the Test propotype.
FXWindowFramer uses less than 350 lines of Java/CSS code, and the Test prototype shows that its initialization only requires that 3 lines be slightly changed compared to a standard FX application initialization.
Resources
Code is herewith spread in 7 files, grouped in two “projects”:
1. src-FXWindowFramer.zip
contains the package fxWindowFramerPKG with its sources
FrameSupport.java,
NodeFramer.java,
FXWindowFramerSTYLE.css (FRAMER decoration);
2. src-TestFramer.zip
contains the package testFramerPKG with the sources of the test sketch
TestFramerCTRL.java,
TestFramerGUI.fxml,
TestFramerMAIN.java,
TestMonitorSTYLE.css (TEST decoration only);
Add to that :
3. dist.zip
which contains all that is needed to execute the test app (beyond a Java8 JVM, of course). Just extract the zip content in a folder and launch TestFramer.jar as usual in your environment (double-click on Windows, for instance). FXWindowFramer.jar is located in the sub-folder "lib", and may be added as such in the class-path of your own applications/tests;
4. Vade Mecum.pdf
Enjoy...