Versions Compared

Key

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

Generated Object

javafx.scene.text.Text

Attributes

This node takes the attributes of the javafx.scene.text.Text class. see javafx.scene.text.Text

Content

This node may take general javafx node content like effects.

Usage

Creates a Text shape.

Examples

Code Block
import groovyx.javafx.GroovyFX
import groovyx.javafx.SceneGraphBuilder

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

    sg.stage(
        title: "Text Example (Groovy)",
        width: 200, height:200,
        visible: true,
    ){ 
        scene (fill: white) {
            text(x: 10, y: 10,
                text: "This is text.",
                fill: red, font: "bold 20pt",
                textOrigin: "top"
                )
        }
    }
});