Versions Compared

Key

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

Generated Object

javafx.scene.web.WebEngine

Attributes

This node takes the attributes from the javafx.scene.web.WebEngine class. see javafx.scene.web.WebEngine

Content

This node takes no content.

Usage

Creates a WebEngine.

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)
            }
        }
    }
});