Package javafx.scene.web

Examples of javafx.scene.web.WebEngine.executeScript()


                current.putTab(tab, current.getNewTabPaths().get(tab), webView);
                WebEngine webEngine = webView.getEngine();

                Worker.State state = webEngine.getLoadWorker().getState();
                if (state == Worker.State.SUCCEEDED)
                    webEngine.executeScript("waitForGetValue()");
            }
        });
        ((Label) tab.getGraphic()).setText("new *");
        current.putTab(tab, null, webView);
        tabPane.getTabs().add(tab);
View Full Code Here


        AnchorPane anchorPane = new AnchorPane();
        WebView webView = createWebView();
        WebEngine webEngine = webView.getEngine();
        webEngine.getLoadWorker().stateProperty().addListener((observableValue1, state, state2) -> {
            if (state2 == Worker.State.SUCCEEDED) {
                webEngine.executeScript(String.format("waitForSetValue('%s')", IOHelper.normalize(IOHelper.readFile(path))));
            }
        });

        anchorPane.getChildren().add(webView);
View Full Code Here

        tab.setContent(anchorPane);

        tab.selectedProperty().addListener((observableValue, before, after) -> {
            if (after) {
                current.putTab(tab, path, webView);
                webEngine.executeScript("if((typeof waitForGetValue)!='undefined') waitForGetValue()");
            }
        });

        current.putTab(tab, path, webView);
        tabPane.getTabs().add(tab);
View Full Code Here

        WebView webView = new WebView();


        WebEngine webEngine = webView.getEngine();
        JSObject window = (JSObject) webEngine.executeScript("window");
        window.setMember("app", this);
        webEngine.load(String.format("http://localhost:%d/editor.html", tomcatPort));

        return webView;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.