Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8100628

Include a no-args constructor on the Scene class

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • fx2.0
    • javafx

      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?).

            amfowler Anne Fowler (Inactive)
            diversonjfx Dean Iverson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: