Generated Object
javafx.scene.image.Image
Value
If a value is passed it is used as the url location for the image.
Attributes
This node takes the attributes of the javafx.scene.image.Image class. see javafx.scene.image.Image.
In addition
url: the URL location for the image.
Content
This node does not take any content
Usage
Creates 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);
}
}
}
});
|