Generated Object
javafx.scene.image.ImageView
Attributes
This node takes the attributes of the javafx.scene.image.ImageView class. see javafx.scene.image.ImageView
Content
This node takes a image node as content.
Usage
Creates an ImageView to display an image.
Examples
| Code Block |
|---|
import groovyx.javafx.SceneGraphBuilder
import groovyx.javafx.GroovyFX
GroovyFX.start({
def sg = new SceneGraphBuilder();
sg.stage(
title: "Hello Image (Groovy)",
visible: true,
) {
scene(fill: "lightgray", width: 600, height:500,) {
imageView(x: 25, y: 40) {
image("file:PIA01320_hires.jpg", width: 500, height: 450, preserveRatio: true);
}
}
}
});
|