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

Include a no-args constructor on the Scene class

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: fx2.0
    • Fix Version/s: None
    • Component/s: javafx
    • Labels:

      Description

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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported: