Duplicating custom nodes in JavaFX
- by Elazar Leibovich
As far as I understand, duplicating nodes in JavaFX should be done with the Duplicator.duplicate function.
It works fine when duplicating nodes whose types are included in JavaFX library, for example
def dup = Duplicator.duplicate(Rectangle{x:30 y:30 width:100 height:100});
dup.translateX = 10;
insert dup into content;
would insert a black…