Versions Compared

Key

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

[be sure to tile the page <BuilderName>.<node> i.e., SwingBuilder.frame]

Generated Object

javafx.stage.Stage

Attributes

This node accepts the attributes for a javafx.stage.Stage class. See the JavaDoc for javafx.stage.Stage

Content

SceneGraphBuilder.scene

Usage

This node builds a javafx.stage.Stage for displaying a Window.

Examples

Code Block

GroovyFX.start({
def foo = "foobar";
def sg = new SceneGraphBuilder(it);

sg.stage(
    title: "Stage Frame",
    x: 100, y: 100, width: 400, height:400,
    visible: true,
    style: "decorated",
    onHidden: { println "Close"}
) {

    scene(fill: hsb(128, 0.5, 0.5, 0.5) ) {
        stylesheets( urls: [ "foo.css "])
        vbox ( spacing: 10) {
            tf = textBox(text: 'Change Me!')
            button(text: bind(source: tf, sourceProperty:'text'))
            label(text: bind{ tf.text })
        }
    }
}

});

Defines various types of JavaFX windows