List of usage examples for javafx.geometry Rectangle2D getHeight
public double getHeight()
From source file:snpviewer.SnpViewer.java
private void fixStageSize(Stage stage, boolean fix) { /*provides a fix for annoying bug which means that * setResizable(false) causing windows to grow in size in Windows *//*from w ww . ja va2 s .c o m*/ if (fix) { stage.setMaxHeight(stage.getHeight()); stage.setMinHeight(stage.getHeight()); stage.setMaxWidth(stage.getWidth()); stage.setMinWidth(stage.getWidth()); } else { Rectangle2D primaryScreenBounds = Screen.getPrimary().getVisualBounds(); stage.setMaxHeight(primaryScreenBounds.getHeight()); stage.setMinHeight(300); stage.setMaxWidth(primaryScreenBounds.getWidth()); stage.setMinWidth(500); } }