Generated Object

javafx.scene.Node

Attributes

This node does not take any attributes.

Content

This node takes one JavaFX node that is used for the graphic for the following nodes:

button, checkBox, label, choiceBox, hyperlink, tooltip, radioButton, toggleButton, and tab.

registerFactory( 'button', lf)
    registerFactory( 'checkBox', lf)
    registerFactory( 'label', lf)
    registerFactory( 'choiceBox', lf)
    registerFactory( 'hyperlink', lf)
    registerFactory( 'tooltip', lf)
    registerFactory( 'radioButton', lf)
    registerFactory( 'toggleButton', lf)

Usage

Used to create a Graphic that is displayed for a Node.

Examples

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

sg.stage(
    title: "TabPane Example",
    x: 100, y: 100, width: 400, height:400,
    visible: true,
    style: "decorated",
) {

    scene(fill: hsb(128, 0.5, 0.5, 0.5) ) {
        tabPane ( ) {
            tab(text: 'Tab 1') {
                label(text: "This is Label 1\n\nAnd there were a few empty lines just there!")
                graphic() {
                    rectangle(width: 20, height: 20, fill: red)
                }
            }
            tab(text: 'Tab 2') {
                label(text: "This is Label 2\n\nAnd there were a few empty lines just there!")
                graphic() {
                    rectangle(width: 20, height: 20, fill: blue)
                }
            }
            tab(text: 'Tab 3') {
                label(text: "This is Label 3\n\nAnd there were a few empty lines just there!")
                graphic() {
                    rectangle(width: 20, height: 20, fill: green)
                }
            }
        }
    }
}

});