Package javafx.stage

Examples of javafx.stage.Stage


 
  public void help() throws IOException {
    FXMLLoader loader = new FXMLLoader(
        JBot.class.getResource("Help.fxml"));
    AnchorPane helpDialog = (AnchorPane) loader.load();
    Stage stage = new Stage();
    stage.initStyle(StageStyle.UTILITY);
    Scene scene = new Scene(helpDialog);
    stage.setScene(scene);
    stage.show();
  }
View Full Code Here


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

 
  public void fisher() throws IOException {
    FXMLLoader loader = new FXMLLoader(
        JBot.class.getResource("Fisher.fxml"));
    AnchorPane aPane = (AnchorPane) loader.load();
    Stage stage = new Stage();
    stage.initStyle(StageStyle.DECORATED);
    Scene scene = new Scene(aPane);
    stage.setScene(scene);
    stage.show();
  }
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);
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    stage.setWidth(screenSize.getWidth());
    stage.setHeight(screenSize.getHeight());
    stage.show();
    scene.setOnMousePressed(new EventHandler<MouseEvent>() {
      public void handle(MouseEvent me) {
        leftHandX = (int) me.getScreenX();
        leftHandY = (int) me.getScreenY();
        prop.setProperty("leftHandX", Integer.toString(leftHandX));
        prop.setProperty("leftHandY", Integer.toString(leftHandY));
        try {
          prop.store(new FileOutputStream("config.properties"), null);
          stage.close();
        } catch (Exception e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
      }
View Full Code Here

  public void selectBlanks() 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);
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    stage.setWidth(screenSize.getWidth());
    stage.setHeight(screenSize.getHeight());
    stage.show();
    scene.setOnMousePressed(new EventHandler<MouseEvent>() {
      public void handle(MouseEvent me) {
        try {
          blankX.add(iteration, (int) me.getScreenX());
          blankY.add(iteration, (int) me.getScreenY());
          prop.setProperty("blanksX" + Integer.toString(iteration), Integer.toString(blankX.get(iteration)));
          prop.setProperty("blanksY" + Integer.toString(iteration), Integer.toString(blankY.get(iteration)));
          prop.setProperty("bps", bps.getText());
          prop.setProperty("spell", spell.getText());
          prop.setProperty("runeDelay", delay.getText());
          bpss = Integer.parseInt(bps.getText());
          prop.store(new FileOutputStream("config.properties"), null);
          iteration++;
          if (iteration > Integer.parseInt(bps.getText()) - 1) {
            iteration = 0;
            stage.close();
          }
        } catch (Exception e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
View Full Code Here

 
  public void select() 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);
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    stage.setWidth(screenSize.getWidth());
    stage.setHeight(screenSize.getHeight());
    stage.show();
    scene.setOnMousePressed(new EventHandler<MouseEvent>() {
      public void handle(MouseEvent me) {
        foodX = (int) me.getScreenX();
        foodY = (int) me.getScreenY();
        foodDelay = Integer.parseInt(delay.getText());
        prop.setProperty("foodX", Integer.toString(foodX));
        prop.setProperty("foodY", Integer.toString(foodY));
        if (delay.getText() != null || delay.getText().equalsIgnoreCase("")); {
        prop.setProperty("foodDelay", delay.getText());
        }
        try {
          prop.store(new FileOutputStream("config.properties"), null);
          stage.close();
        } catch (Exception e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
      }
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

 
  public void help() throws IOException {
    FXMLLoader loader = new FXMLLoader(
        JBot.class.getResource("Help.fxml"));
    AnchorPane helpDialog = (AnchorPane) loader.load();
    Stage stage = new Stage();
    stage.initStyle(StageStyle.UTILITY);
    Scene scene = new Scene(helpDialog);
    stage.setScene(scene);
    stage.show();
  }
View Full Code Here

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

TOP

Related Classes of javafx.stage.Stage

Copyright © 2018 www.massapicom. 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.