-
Enhancement
-
Resolution: Duplicate
-
P4
-
None
-
fx2.0
A no-args constructor would allow the use of the property map initialization pattern in Groovy:
def scene = new Scene(root: rootNode, width: 400, height: 400, fill: Color.BLACK)
This is a little nicer since you can see which properties are getting initialized and it allows Scene to be initialized in Groovy just like Circles, Rectangles, etc.
It looks like all it would take would be to assign a default value to the root property if the no-arg c'tor is called (maybe a Region would be a good choice?).
def scene = new Scene(root: rootNode, width: 400, height: 400, fill: Color.BLACK)
This is a little nicer since you can see which properties are getting initialized and it allows Scene to be initialized in Groovy just like Circles, Rectangles, etc.
It looks like all it would take would be to assign a default value to the root property if the no-arg c'tor is called (maybe a Region would be a good choice?).
- is blocked by
-
JDK-8099401 Allow Scene to be created without a root specified in the constructor
- Closed