Package javafx.stage

Examples of javafx.stage.Stage


            _minimize();
        }
    }

    private void _minimize() {
        Stage stage = undecorator.getStage();
        stage.setIconified(true);
    }
View Full Code Here


    /**
     * Prepare Stage for dock feedback display
     */
    void buildDockFeedbackStage() {
        dockFeedbackPopup = new Stage(StageStyle.TRANSPARENT);
        dockFeedback = new Rectangle(0, 0, 100, 100);
        dockFeedback.setArcHeight(10);
        dockFeedback.setArcWidth(10);
        dockFeedback.setFill(Color.TRANSPARENT);
        dockFeedback.setStroke(Color.BLACK);
View Full Code Here

     * Actions
     */
    protected void maximizeOrRestore() {


        Stage stage = undecorator.getStage();

        if (maximized) {
            restoreSavedBounds(stage, false);
            undecorator.setShadow(true);
            savedBounds = null;
            maximized = false;
        } else {
            ObservableList<Screen> screensForRectangle = Screen.getScreensForRectangle(stage.getX(), stage.getY(), stage.getWidth(), stage.getHeight());
            Screen screen = screensForRectangle.get(0);
            Rectangle2D visualBounds = screen.getVisualBounds();

            savedBounds = new BoundingBox(stage.getX(), stage.getY(), stage.getWidth(), stage.getHeight());

            undecorator.setShadow(false);

            stage.setX(visualBounds.getMinX());
            stage.setY(visualBounds.getMinY());
            stage.setWidth(visualBounds.getWidth());
            stage.setHeight(visualBounds.getHeight());
            maximized = true;
        }
    }
View Full Code Here

            maximized = true;
        }
    }

    public void saveBounds() {
        Stage stage = undecorator.getStage();
        savedBounds = new BoundingBox(stage.getX(), stage.getY(), stage.getWidth(), stage.getHeight());
    }
View Full Code Here

        Stage stage = undecorator.getStage();
        savedBounds = new BoundingBox(stage.getX(), stage.getY(), stage.getWidth(), stage.getHeight());
    }

    public void saveFullScreenBounds() {
        Stage stage = undecorator.getStage();
        savedFullScreenBounds = new BoundingBox(stage.getX(), stage.getY(), stage.getWidth(), stage.getHeight());
    }
View Full Code Here

    private final Stage stage;


    private ModePicker() {
        System.out.println("Setting up Mode Picker stage");
        stage = new Stage();
        stage.setTitle(MiniDisc.getAppTitle()+" - Choose Mode");
        stage.setResizable(false);

        TilePane mainGroup = new TilePane();
        mainGroup.setPrefColumns(3);
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);
    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) {
        spearX = (int) me.getScreenX();
        spearY = (int) me.getScreenY();
        spearDelay = Integer.parseInt(delay.getText());
        prop.setProperty("foodX", Integer.toString(spearX));
        prop.setProperty("foodY", Integer.toString(spearY));
        if (delay.getText() != null || delay.getText().equalsIgnoreCase("")); {
        prop.setProperty("spearDelay", 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 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 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

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.