Archive for category Undecorator
Undecorator: A New Theme
Posted by arnaud nouard in JavaFX, Undecorator on 25/03/2016
Hi folks!
It’s been a while since my last post, but I didn’t give up JavaFX coding!
Here is a little update on this Stage decoration library, this time focused on a new theme named “Touch” with large icons, and with some minor bug fixes.
Here is a video version:
Last but not least:
The executable jar to test: here!
The source code: here!
For those of you who would like to stay with the classic theme, you have to call this method before the create the UndecoratorScene:
// Override default Touch theme: UndecoratorScene.setClassicDecoration(); UndecoratorScene undecoratorScene = new UndecoratorScene(primaryStage, root);
Here is the result in the demo:
Last comment, there’s still an issue on Mac OSX in JavaFX with the fullscreen mode with Undecorated windows…
Enjoy, feel free to comment!
Thanks
MagniFiX
Posted by arnaud nouard in JavaFX, Undecorator on 23/12/2014
MagniFiX is a (very) small example illustrating the JavaFX transparent stage (Undecorator).
I wrote this sample just for fun, so hope you’ll enjoy it! This is basic desktop magnifier:
If you’re interested, here are the Sources and, of course, the executable DemoJar to play with it!
Have fun with JavaFX
See you next year!
-in-sideFX-
Undecorator Bis
Posted by arnaud nouard in JavaFX, Undecorator on 20/12/2014
Transparent and rounded!
A new version of my JavaFX window decoration API. This time focused on the transparency and non-rectangular window.
Jar is here and sources are available on GitHub.
You can directly execute the jar if your security settings allow you or type:
java -jar UndecoratorBis.jar
By default, your transparent stage will look like this:
If you want to customize the stage background, you can play with these CSS settings:
/* The Stage background. */ .decoration-background{ -fx-fill: radial-gradient(focus-angle 45deg, focus-distance 20%, center 25% 25%, radius 50%, reflect, #eeeeee88, #aaaaaa88 75%, gray); -fx-stroke-width: 0; -fx-arc-width:20px; -fx-arc-height:20px; } /* Defines the rectangle responsible for the shadow */ .decoration-shadow{ -fx-fill: black; -fx-stroke-width: 0; -fx-arc-width:20px; -fx-arc-height:20px; }
And apply them on the scene:
undecoratorScene.addStylesheet("mySettings.css");
You can get something like this:

Video:
Have fun with it! and…
That’s all for 2014!
Undecorator for Java 8
Posted by arnaud nouard in JavaFX, Undecorator on 15/06/2014
Undecorator – Automn enhancements
Posted by arnaud nouard in JavaFX, Undecorator on 01/11/2013
Hi Folks!
For my next application development I needed a refresh of the Undecorator helper, so here are the details of the enhancements:
Title bar
How to display the title set on the stage:
public void start(final Stage primaryStage) throws Exception { primaryStage = stage; // Set the title before to create the Undecorator class primaryStage.setTitle("Undecorator Scene Demo"); UndecoratorScene undecoratorScene = new UndecoratorScene(primaryStage, root);
New dock feedback
And many issues fixed… and found :-):
JavaFX bugs (Mac only):
- Set stage as fullscreen using Keyboard accelerator (Ctrl+Cmd+F) crashes JVM
- KeyCombination does not respect keyboard’s locale (i.e. always QWERTY key code)
- Multi screen: On second screen JFX returns wrong values, e.g. MinY ==300 (?!)
Check this out!
Executable jar file is still here:
and to access to the code, project and binaries it’s still there:
That’s all for today and stay tuned for my next JavaFX App announcement :-)!
Undecorator – update
Posted by arnaud nouard in Undecorator on 23/07/2013
Back to Undecorator, with little code cleaning, bug fixing and comments added.
As mini feature, a direct access to fullscreen mode via a button in the window “title” bar:
The UndecoratorSceneDemo and UndecoratorStageDemo now includes an example for the UTILITY stage mode.
As a reminder the difference between those 2 demos are:
- UndecoratorStageDemo: Use directly the Undecorator class as an helper to enhance your existing apps
- UndecoratorSceneDemo: Use the UndecoratorScene class which replace your Scene, code is more simpler.
To see the Utility stage mode, just press the “Show Utility stage” button and…
An undecorated utility stage appears with its capabilities.
Try!
Executable jar file is still here:
and to access to the code, project and binaries it’s still there:
Still to investigate:
- Behavior with Java8 (visual artifacts)
- Menus are not displayed on fullscreen mode on MacOS: They are displayed “under” the main window.
Stay tuned ’till next update 🙂
Have a nice summerFX to you all.
A.
Undecorator – Final “Stage”
Posted by arnaud nouard in JavaFX, Undecorator on 27/02/2013
Undecorator 1.0, not bug free but finally at a usable stage!
In this “1.0” version you will get the following improvements:
- An experimental “docking” feature on screen’s edges
- Full screen capability in Stage’s menu
- Despite a JavaFX bug on Mac OS: popup menu are not well displayed (http://javafx-jira.kenai.com/browse/RT-19457)
3. Fade transition on window showing and closing
undecoratorScene.setFadeTransitionEnabled();
4. Localization of messages (maximize, minimize …)
5. UTILITY stage style support The usage of UTILITY Stage style is:
/** * UndecoratorScene constructor * @param stage The main stage * @param stageStyle could be StageStyle.UTILITY or StageStyle.TRANSPARENT * @param root your UI to be displayed in the Stage * @param stageDecorationFxml Your own Stage decoration or null to use the built-in one */ public UndecoratorScene(Stage stage, StageStyle stageStyle, Parent root, String stageDecorationFxml)
Take a look!
Try!
Executable jar file is still here: and to access to the code, project and binaries it’s still there:
How to use it
public class UndecoratorSceneDemo extends Application { @Override public void start(final Stage stage) throws Exception { // The Undecorator as a Scene Region root = FXMLLoader.load(getClass().getResource("ClientArea.fxml")); final UndecoratorScene undecoratorScene = new UndecoratorScene(stage, root); // Enable fade transition undecoratorScene.setFadeInTransition(); /* * Fade transition on window closing request */ stage.setOnCloseRequest(new EventHandler<WindowEvent>() { @Override public void handle(WindowEvent we) { we.consume(); // Do not hide undecoratorScene.setFadeOutTransition(); } }); stage.setScene(undecoratorScene); stage.sizeToScene(); stage.toFront(); // Set minimum size based on client area's minimum sizes Undecorator undecorator = undecoratorScene.getUndecorator(); stage.setMinWidth(undecorator.getMinWidth()); stage.setMinHeight(undecorator.getMinHeight()); stage.show(); } }
What is coming next?
I’ll make a break on the improvement of the Undecorator series and I’ll concentrate my efforts on using it as a stage decorator for my other projects, so I’ll certainly provides updates if it’s not sufficient, especially on Mac OS where maximization on top of the screen and fullscreen capability have some trouble…
Stay tuned 🙂 !
As usual, please give your feedbacks,
Thanks!