Undecorator
Undecorator copied to clipboard
JavaFX 8 support
When I try this demo use jdk8, Undecorator.getBackground method has compile error,
Java 8 support will be appreciated!
Yeah same with me. I just uncommented some lines of code. Because in my application I never use this method:
/*
public void setBackgroundStyle(String style) {
undecorator.getBackground().setStyle(style);
}
public void setBackgroundPaint(Paint paint) {
undecorator.removeDefaultBackgroundStyleClass();
undecorator.getBackground().setFill(paint);
}
*/
The shadow window decoration does not seem to work anymore on JavaFX8. The window border should be transparent.
Yes, there are issues with Java8. It's in my backlog to fix all of them soon. I'll probably fork the code, one for 7 the other for 8. Thanks for reporting this.
Is there a work-around for the shadow window problem?
Not yet afaik. As temporary solution, you can disable shadow by setting window-shadow-width property in skin/undecorator.properties to zero.
I haven't looked into it deeply and whether it is related to JavaFX 8 compatibility, but to get things to work from the example I needed to cast the Root to Region:
Undecorator undecorator = new Undecorator(primaryStage, (Region)root);
Undecorator constructor requires a Region, so I suspect root is not? Why don't you use UndecoratorScene instead? Thx