Generated Object
javafx.scene.control.Label
Attributes
This node takes the attributes of the javafx.scene.control.Label. see javafx.scene.control.Label.
Content
If the content is a javafx.scene.control.Tooltip (see javafx.scene.control.Tooltip) object, then the CheckBox's tooltip will be set to this Tooltip object.
If the content is a JavaFX Node, then the Label's graphic will be set to the JavaFX Node.
Other content is processed per the common javafx Node content including input events, effects and transforms.
Usage
This is a JavaFX Node and accepts the common Node attributes.
Examples
| Code Block |
|---|
GroovyFX.start({
def sg = new SceneGraphBuilder();
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), parent: group()) {
label (
layoutX: 25,
layoutY: 300,
font: "16pt Courier",
text: "This is a label"
)
}
}
});
|