Package javafx.fxml

Examples of javafx.fxml.FXMLLoader.load()


        // Stage Utility usage
        Region root = null;
        try {
            FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("ClientAreaUtility.fxml"));
            fxmlLoader.setController(this);
            root = (Region) fxmlLoader.load();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        Stage utilityStage = new Stage();
        utilityStage.setTitle("Stage Utility type demo");
View Full Code Here


        // The UI (Client Area) to display
        Region root = null;
        try {
            FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("ClientArea.fxml"));
            fxmlLoader.setController(this);
            root = (Region) fxmlLoader.load();
        } catch (Exception ex) {
            ex.printStackTrace();
        }

        final Undecorator undecorator = new Undecorator(stage, root);
View Full Code Here

        // Stage Utility usage
        Region root = null;
        try {
            FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("ClientAreaUtility.fxml"));
            fxmlLoader.setController(this);
            root = (Region) fxmlLoader.load();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        Stage utilityStage = new Stage();
        utilityStage.setTitle("Stage Utility type demo");
View Full Code Here

        // UI part of the decoration
        try {
            FXMLLoader fxmlLoader = new FXMLLoader(stageDecorationFxmlAsURL);
//            fxmlLoader.setController(new StageDecorationController(this));
            fxmlLoader.setController(this);
            stageDecoration = (Pane) fxmlLoader.load();
        } catch (Exception ex) {
            LOGGER.log(Level.SEVERE, "Decorations not found", ex);
        }
        initDecoration();
View Full Code Here

    FXMLLoader loadSynchronously(final URL resource, ResourceBundle bundle, final String conventionalName) throws IllegalStateException {
        final FXMLLoader loader = new FXMLLoader(resource, bundle);
        loader.setControllerFactory((Class<?> p) -> Injector.instantiatePresenter(p, this.injectionContext));
        try {
            loader.load();
        } catch (IOException ex) {
            throw new IllegalStateException("Cannot load " + conventionalName, ex);
        }
        return loader;
    }
View Full Code Here

  }
 
  public void selectSpears() throws IOException {
    FXMLLoader loader = new FXMLLoader(
        JBot.class.getResource("Select.fxml"));
    AnchorPane selectDialog = (AnchorPane) loader.load();
    final Stage stage = new Stage();
    stage.initStyle(StageStyle.TRANSPARENT);
    Scene scene = new Scene(selectDialog);
    stage.setScene(scene);
    stage.setOpacity(0.1);
View Full Code Here

  }
 
  public void selectLeftHand() throws IOException, AWTException {
    FXMLLoader loader = new FXMLLoader(
        JBot.class.getResource("Select.fxml"));
    AnchorPane selectDialog = (AnchorPane) loader.load();
    final Stage stage = new Stage();
    stage.initStyle(StageStyle.TRANSPARENT);
    Scene scene = new Scene(selectDialog);
    stage.setScene(scene);
    stage.setOpacity(0.1);
View Full Code Here

    this.primaryStage.setTitle("jBot");

    try {
      FXMLLoader loader = new FXMLLoader(
          JBot.class.getResource("Main.fxml"));
      rootLayout = (AnchorPane) loader.load();
      Scene scene = new Scene(rootLayout);
      primaryStage.setScene(scene);
      primaryStage.show();
      primaryStage.setResizable(false);
    } catch (Exception e) {
View Full Code Here

  }

  public void runemaker() throws IOException {
    FXMLLoader loader = new FXMLLoader(
        JBot.class.getResource("Runemaker.fxml"));
    pane = (AnchorPane) loader.load();
    final Stage stage = new Stage();
    stage.initStyle(StageStyle.DECORATED);
    Scene scene = new Scene(pane);
    stage.setScene(scene);
    stage.show();
View Full Code Here

  }
 
  public void foodEater() throws IOException {
    FXMLLoader loader = new FXMLLoader(
        JBot.class.getResource("Eater.fxml"));
    AnchorPane pane = (AnchorPane) loader.load();
    final Stage stage = new Stage();
    stage.initStyle(StageStyle.DECORATED);
    Scene scene = new Scene(pane);
    stage.setScene(scene);
    stage.show();
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.