Generated Object
javafx.scene.web.WebView
Attributes
This node takes the attributes from the javafx.scene.web.WebView class. see javafx.scene.web.WebView
Content
This node takes the common node content, effects, transforms, and input.
Usage
Creates a WebView JavaFX node.
Examples
| Code Block |
|---|
import groovyx.javafx.GroovyFX
import groovyx.javafx.SceneGraphBuilder
def url = "http://www.yahoo.com";
GroovyFX.start({
def sg = new SceneGraphBuilder();
def webEngine = sg.webEngine(location: url);
def goAction = { webEngine.load(urlBox.getText()) };
def stage = sg.stage(
title: "Web Engine (Groovy)",
visible: true,
) {
scene(fill: gray, width: 640, height: 500) {
vbox() {
hbox() {
urlBox = textBox( text: url, action: goAction, prefWidth:400);
button(text: "Go", onAction: goAction)
}
wv = webView(engine: webEngine)
}
}
}
});
|