java.lang.Object
com.dlsc.gmapsfx.javascript.JavaFxWebEngine
- All Implemented Interfaces:
IWebEngine
public class JavaFxWebEngine extends Object implements IWebEngine
This class provides an implementation of the IWebEngine interface utilizing
a javafx.scene.web.WebEngine as the underlying engine.
- Author:
- Rob Terpilowski
-
Field Summary
Fields Modifier and Type Field Description protected javafx.scene.web.WebEnginewebEngine -
Constructor Summary
Constructors Constructor Description JavaFxWebEngine(javafx.scene.web.WebEngine engine)Builds a new engine utilizing the specified JavaFX WebEngine -
Method Summary
Modifier and Type Method Description ObjectexecuteScript(String command)Executes the specified JavaScript Commandjavafx.concurrent.Worker<Void>getLoadWorker()Gets a worked which will be notified when a web page has finished loading.voidload(String url)Loads the specified URLvoidloadContent(String content)Loads the given HTML content directly.voidsetOnAlert(javafx.event.EventHandler<javafx.scene.web.WebEvent<String>> eventHandler)voidsetOnError(javafx.event.EventHandler<javafx.scene.web.WebErrorEvent> eventHandler)
-
Field Details
-
webEngine
protected javafx.scene.web.WebEngine webEngine
-
-
Constructor Details
-
JavaFxWebEngine
public JavaFxWebEngine(javafx.scene.web.WebEngine engine)Builds a new engine utilizing the specified JavaFX WebEngine- Parameters:
engine- The JavaFX WebEngine to use.
-
-
Method Details
-
executeScript
Executes the specified JavaScript Command- Specified by:
executeScriptin interfaceIWebEngine- Parameters:
command- The command to execute- Returns:
- The object returned by the script (if any).
-
getLoadWorker
Gets a worked which will be notified when a web page has finished loading.- Specified by:
getLoadWorkerin interfaceIWebEngine- Returns:
- The worker
-
load
Loads the specified URL- Specified by:
loadin interfaceIWebEngine- Parameters:
url- The URL to load in the engine.
-
loadContent
Loads the given HTML content directly.- Specified by:
loadContentin interfaceIWebEngine- Parameters:
content- The HTML text to load in the engine.
-
setOnAlert
-
setOnError
public void setOnError(javafx.event.EventHandler<javafx.scene.web.WebErrorEvent> eventHandler)
-