Пример #1
0
  @Override
  public void createPartControl(Composite container) {

    Platform.setImplicitExit(false); // Keep the JavaFX thread running

    // Creating a JavaFX Browser, so create an FXCanvas to contain it
    FXCanvas canvas = new FXCanvas(container, SWT.NONE);
    BorderPane borderPane = new BorderPane();
    Scene scene = new Scene(borderPane);

    WebView browser = new WebView();
    webEngine = browser.getEngine();
    webEngine.load(homeLocation);

    borderPane.setCenter(browser);

    canvas.setScene(scene);

    IActionBars actionBars = getIntroSite().getActionBars();
    IToolBarManager toolBar = actionBars.getToolBarManager();

    setupToolbarButtons(toolBar);
    lockUrl();
    addJSBridges();
  }
Пример #2
0
 @Override
 public void setRootPart(IRootPart<Node> editpart) {
   super.setRootPart(editpart);
   if (editpart != null) {
     canvas.setScene(createScene((Parent) editpart.getVisual()));
   } else {
     canvas.setScene(null);
   }
 }