Posts Tagged Stage background

Undecorator Bis

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:

Look at demoapp/UndecoratorSceneDemo.java for this sample.

 

 

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:
UndecoratorBis
Video:

 

Have fun with it! and…

That’s all for 2014!

31 Comments