Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Generated Object

Specifies a node and properties for assigning a node to the left border region in a borderPane.

Attributes

align the alignment within the region, values can either be a javafx.geometry.Pos object, or a string that maps the the enumerations defined for the Pos object. see javafx.geomety.Pos

margin the margin to surround the node within the borderPane region. This contains a javafx.geometry.Insets object, or a list of numbers that contain the top, right, bottom, and left margins. If only one number is provided then all sides of the margin will be set to that number. If 2 numbers are provided the top and bottom will use the first number and left and right will use the second number. see javafx.geometry.Insets

Content

This node contains one javafx.scene.Node.

Usage

Sets the node at the left region of the borderPane.

Examples

Code Block
import groovyx.javafx.GroovyFX
import javafx.scene.paint.Color;
import groovyx.javafx.SceneGraphBuilder
import javafx.scene.control.*;

GroovyFX.start({
    def sg = new SceneGraphBuilder();

    sg.stage(
        title: "BorderPane Example (Groovy)",
        width: 650, height:450,
        visible: true,
    ) {
         scene(fill: lightgreen ) {
             borderPane() {
                 top(align: "center", margin: [10,0,10,0]) {
                     button(text: "top")
                 }
                 right(align: "center", margin: 10) {
                     button(text: "right")
                 }
                 left(align: "center", margin: [0,10]) {
                     button(text: "left")
                 }
                 bottom(align: "center", margin: [10,0]) {
                     button(text: "bottom")
                 }
                 //          center( align: "center" ) {
                     label(text: "center")
                 //          }
             }
         }
    }
});