protected boolean validHeight(BoundingBox box, Region region, double cellH, double gutterX, double gutterY) { boolean valid = false; if (region.getMinHeight() != -1 && box.getHeight() * cellH + (box.getHeight() - 1) * 2 * gutterY < region.getMinHeight()) { return false; } if (region.getPrefHeight() == USE_COMPUTED_SIZE && box.getHeight() * cellH + (box.getHeight() - 1) * 2 * gutterY >= region .prefHeight(region.prefWidth(-1))) { valid = true; } if (region.getPrefHeight() != USE_COMPUTED_SIZE && box.getHeight() * cellH + (box.getHeight() - 1) * 2 * gutterY >= region .getPrefHeight()) { valid = true; } return valid; }
box.getMinY(), box.getWidth(), box.getHeight()); boxes.add(box); break;
box.getMinY(), box.getWidth(), box.getHeight()); boxes.add(box); break;
primaryStage.setY(maximizedBox.getMinY()); primaryStage.setWidth(maximizedBox.getWidth()); primaryStage.setHeight(maximizedBox.getHeight()); btnMax.setGraphic(resizeMin); btnMax.setTooltip(new Tooltip("Restore Down")); primaryStage.setY(originalBox.getMinY()); primaryStage.setWidth(originalBox.getWidth()); primaryStage.setHeight(originalBox.getHeight()); originalBox = null; btnMax.setGraphic(resizeMax);
protected boolean validHeight(BoundingBox box, Region region, double cellH, double gutterX, double gutterY) { boolean valid = false; if (region.getMinHeight() != -1 && box.getHeight() * cellH + (box.getHeight() - 1) * 2 * gutterY < region.getMinHeight()) { return false; } if (region.getPrefHeight() == USE_COMPUTED_SIZE && box.getHeight() * cellH + (box.getHeight() - 1) * 2 * gutterY >= region .prefHeight(region.prefWidth(-1))) { valid = true; } if (region.getPrefHeight() != USE_COMPUTED_SIZE && box.getHeight() * cellH + (box.getHeight() - 1) * 2 * gutterY >= region .getPrefHeight()) { valid = true; } return valid; }
box.getMinY(), box.getWidth(), box.getHeight()); boxes.add(box); break;
box.getMinY(), box.getWidth(), box.getHeight()); boxes.add(box); break;
public void restoreSavedBounds(Stage stage, boolean fullscreen) { if (savedBounds != null) { stage.setX(savedBounds.getMinX()); stage.setY(savedBounds.getMinY()); stage.setWidth(savedBounds.getWidth()); stage.setHeight(savedBounds.getHeight()); savedBounds = null; } }
public void restoreFullScreenSavedBounds(Stage stage) { if (savedFullScreenBounds != null) { stage.setX(savedFullScreenBounds.getMinX()); stage.setY(savedFullScreenBounds.getMinY()); stage.setWidth(savedFullScreenBounds.getWidth()); stage.setHeight(savedFullScreenBounds.getHeight()); savedFullScreenBounds = null; } }
primaryStage.setY(maximizedBox.getMinY()); primaryStage.setWidth(maximizedBox.getWidth()); primaryStage.setHeight(maximizedBox.getHeight()); btnMax.setGraphic(resizeMin); btnMax.setTooltip(new Tooltip("Restore Down")); primaryStage.setY(originalBox.getMinY()); primaryStage.setWidth(originalBox.getWidth()); primaryStage.setHeight(originalBox.getHeight()); originalBox = null; btnMax.setGraphic(resizeMax);