Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3


Code Block
scene(cursor: "OPEN_HAND")     // javafx.scene.Cursor static member.
sg.stage(style: "transparent") // javafx.stage.StageStyle enumeration
scrollBar(min: 0, max: 100, value: 50, orientation: horizontal) // javafx.geometry.Orientation enumeration


The Geometry objects in the javafx.geometry package, Point2D, Point3D, Dimension2D, Rectangle2D, and BoundingBox,  may be set using numbered lists. For the 2D classes, 2 numbers must be provided, and for the 3D classes, 3 numbers must be provided. BoundingBox may be either 2D, requiring 4 values, or 3D, requiring 6 values. A Rectangle2D may also take and empty list or the "EMPTY" string as shown in the previous section on Insets.

Code Block
rotate(angle: 90, axis: [1,1,0])
imageView(viewport: [0,0, 400, 400])


The javafx.geometry.Insets class may be instantiated by using the javafx class, or by using a Groovy number list. If a number list is used, it may contain, one, two, or four numbers. If one number is presented then all sides of the Insets will be set to that value. If two numbers are presented then the first number will be used to set the top and bottom side of the Inset, and the second number will be used to set the left and right side of the Inset. If four numbers are present in the list, the numbers will be assigned to the the top, right, bottom and left in order. An empty list or the String "empty" will map to the Insets.EMPTY object.

Code Block
stackPane(style: "-fx-background-color: burlywood", padding: 20) 
stackPane(style: "-fx-background-color: burlywood", padding: [10])
stackPane(style: "-fx-background-color: burlywood", padding: [50, 25])
stackPane(style: "-fx-background-color: burlywood", padding: [0, 50, 0, 0])
stackPane(style: "-fx-background-color: burlywood", padding: [])
stackPane(style: "-fx-background-color: burlywood", padding: "EMPTY")