本文整理了Java中javafx.scene.web.WebView.getEngine()
方法的一些代码示例,展示了WebView.getEngine()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebView.getEngine()
方法的具体详情如下:
包路径:javafx.scene.web.WebView
类名称:WebView
方法名:getEngine
暂无
代码示例来源:origin: org.beryx.viewreka/viewreka-fxui
@Override
public void displayChart(String data) {
webEngineConsumer.accept(webView.getEngine());
}
}
代码示例来源:origin: stackoverflow.com
@FXML
private WebView view;
private String link = "http://google.com";
private WebEngine engine;
@Override
public void initialize(URL url, ResourceBundle rb) {
engine = view.getEngine();
engine.load(link);
}
代码示例来源:origin: org.copper-engine/copper-monitoring-client
@Override
public void clear() {
listView.getEngine().loadContent("");
}
}
代码示例来源:origin: org.netbeans.html/net.java.html.boot.fx
@Override
public void handle(ActionEvent event) {
enableFirebug(webView.getEngine());
firebug.setDisable(true);
}
});}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-templatesui
@Override
public Object call() throws Exception {
return v.getEngine().executeScript(prop);
}
});
代码示例来源:origin: stackoverflow.com
Node webNode = htmlEditor.lookup(".web-view");
if (webNode instanceof WebView) {
WebView webView = (WebView) webNode;
WebEngine engine = webView.getEngine();
engine.executeScript("alert('helo')"); // add js code here
}
代码示例来源:origin: PhoenicisOrg/phoenicis
@Override
public String getCurrentUrl() {
if (webView.getEngine().getDocument() == null) {
return "";
}
return webView.getEngine().getDocument().getDocumentURI();
}
}
代码示例来源:origin: org.copper-engine/copper-monitoring-client
@Override
public void changed(ObservableValue<? extends ProviderResultModel> observable, ProviderResultModel oldValue,
ProviderResultModel newValue) {
if (newValue != null) {
content.getEngine().loadContent(newValue.content.get());
}
}
});
代码示例来源:origin: org.netbeans.html/net.java.html.boot.fx
@Override
public void changed(ObservableValue<? extends String> ov, String t, String t1) {
title = view.getEngine().getTitle();
if (title != null) {
stage.setTitle(title);
}
}
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
public Browser() {
super();
Platform.runLater(() -> {
browser = new WebView();
webEngine = browser.getEngine();
getChildren().add(browser);
});
}
}
代码示例来源:origin: com.machinepublishers/jbrowserdriver
/**
* {@inheritDoc}
*/
@Override
public String getTitle() {
init();
return AppThread.exec(context.get().item().statusCode, () -> context.get().item().view.get().getEngine().getTitle());
}
代码示例来源:origin: no.tornado/tornadofx-controls
public InlineHTML() {
getStyleClass().add("inline-html");
view = new WebView();
getChildren().add(view);
content.addListener((observable, oldValue, newValue) ->
view.getEngine().loadContent(newValue));
}
代码示例来源:origin: org.copper-engine/copper-monitoring-client
@Override
public void clear() {
resultTable.getItems().clear();
content.getEngine().loadContent("");
}
代码示例来源:origin: PhoenicisOrg/phoenicis
/**
* Updates the application description when the application changes
*
* @param appDescription The web view containing the application description
*/
private void updateDescription(final WebView appDescription) {
final ApplicationDTO application = getControl().getApplication();
if (application != null) {
appDescription.getEngine().loadContent("<body>" + application.getDescription() + "</body>");
}
}
代码示例来源:origin: org.netbeans.html/net.java.html.boot.fx
public static void observeView(WebView view, Stage stage) {
Title t = new Title(view, stage);
view.getEngine().titleProperty().addListener(t);
t.changed(null, null, null);
}
代码示例来源:origin: com.machinepublishers/jbrowserdriver
/**
* {@inheritDoc}
*/
@Override
public void refresh() {
AppThread.exec(context.item().statusCode, ((TimeoutsServer) driver.get().manage().timeouts()).getPageLoadTimeoutMS(),
() -> {
context.item().view.get().getEngine().reload();
return null;
});
}
代码示例来源:origin: org.copper-engine/copper-monitoring-client
@Override
public void changed(ObservableValue<? extends WorkflowVersion> observable, WorkflowVersion oldValue, WorkflowVersion newValue) {
sourceView.getEngine().loadContent(codeMirrorFormatter.format(newValue.source.get(), CodeFormatLanguage.JAVA, true));
ComponentUtil.startValueSetAnimation(detailStackPane);
}
});
代码示例来源:origin: org.copper-engine/copper-monitoring-client
@Override
public void handle(ActionEvent event) {
model.sqlQuery.setValue(history.getSelectionModel().getSelectedItem());
sqlEditor.getEngine().executeScript("editor.setValue('" + history.getSelectionModel().getSelectedItem() + "');");
}
});
代码示例来源:origin: PhoenicisOrg/phoenicis
@Override
protected void drawStepContent() {
super.drawStepContent();
webView.prefWidthProperty().bind(getContentPane().widthProperty());
webView.getEngine().setUserAgent("use required / intended UA string");
this.addToContentPane(webView);
}
代码示例来源:origin: org.netbeans.html/net.java.html.boot.fx
@Override
public WebEngine call(PopupFeatures param) {
final Stage stage = new Stage(StageStyle.UTILITY);
stage.initOwner(owner);
final WebView popUpView = new WebView();
stage.setScene(new Scene(popUpView));
Title.observeView(popUpView, stage);
stage.show();
return popUpView.getEngine();
}
});
内容来源于网络,如有侵权,请联系作者删除!