use of com.teamdev.jxbrowser.chromium.Browser in project TeachingInSimulation by ScOrPiOzzy.
the class TestJxBrowserJfx method start.
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.initStyle(StageStyle.DECORATED);
Browser browser = new Browser(BrowserType.LIGHTWEIGHT);
BrowserView view = new BrowserView(browser);
primaryStage.setScene(new Scene(view));
browser.loadURL("http://file.keking.cn/");
// browser.loadURL("http://58.214.15.134:8945/DigitalCampus_v3.0_nj/loginInit!init.action");
// browser.setContextMenuHandler(new ContextMenuHandler() {
// @Override
// public void showContextMenu(ContextMenuParams params) {
// System.out.println(params.getPageURL());
// }
// });
primaryStage.show();
}
use of com.teamdev.jxbrowser.chromium.Browser in project TeachingInSimulation by ScOrPiOzzy.
the class TestJxBrowserPdf method start.
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.initStyle(StageStyle.TRANSPARENT);
Browser browser = new Browser(BrowserType.LIGHTWEIGHT);
BrowserView view = new BrowserView(browser);
primaryStage.setScene(new Scene(view));
browser.loadURL("http://192.168.1.19:8082/Test/Fanuc0i参数说明书.pdf");
// browser.executeJavaScript("var child=document.getElementById(\\\"download\\\");child.parentNode.removeChild(child);");
// browser.executeJavaScript("alert(document.getElementById('download'))");
browser.setDownloadHandler(new DownloadHandler() {
@Override
public boolean allowDownload(DownloadItem download) {
System.out.println(download.getURL());
return false;
}
});
primaryStage.show();
}
use of com.teamdev.jxbrowser.chromium.Browser in project TeachingInSimulation by ScOrPiOzzy.
the class TestJxBrowserSwf method start.
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.initStyle(StageStyle.DECORATED);
Browser browser = new Browser();
BrowserView view = new BrowserView(browser);
primaryStage.setScene(new Scene(view));
browser.loadHTML(HTML_SWF_HEAD + "http://192.168.1.19:8082/Test/teachResources.swf" + HTML_SWF_END);
primaryStage.show();
}
use of com.teamdev.jxbrowser.chromium.Browser in project Spark by igniterealtime.
the class SparkMeetPlugin method open.
private void open(String roomUrl, String roomId) {
browser = new Browser();
BrowserView view = new BrowserView(browser);
frame = new JFrame();
frame.add(view, BorderLayout.CENTER);
frame.setSize(width, height);
frame.setVisible(true);
frame.setTitle("Openfire Meetings - " + roomId);
frame.addWindowListener(new java.awt.event.WindowAdapter() {
@Override
public void windowClosing(java.awt.event.WindowEvent windowEvent) {
close();
}
});
browser.loadURL(roomUrl);
}
use of com.teamdev.jxbrowser.chromium.Browser in project TeachingInSimulation by ScOrPiOzzy.
the class ResourceViewer method createPDFViewer.
/**
* 创建PDF查看器
*/
private void createPDFViewer() {
HTTPUtils utils = SpringUtil.getBean(HTTPUtils.class);
String url = utils.getFullPath(ResourceConsts.FTP_RES_PATH + resource.getPath());
if (url == null) {
return;
}
Browser browser = new Browser(BrowserType.LIGHTWEIGHT);
browser.loadURL(url);
BrowserView view = new BrowserView(browser);
viewer.getChildren().add(view);
}
Aggregations