boolean setStageHeight(double height) { if (height >= primaryStage.getMinHeight() && height >= buttonsContainer.getHeight()) { primaryStage.setHeight(height); // initY = newY; return true; } else if (height >= primaryStage.getMinHeight() && height <= buttonsContainer.getHeight()) { height = buttonsContainer.getHeight(); primaryStage.setHeight(height); } return false; }
@Override public void layoutChildren() { super.layoutChildren(); if (dialog.getMinWidth() > 0 && dialog.getMinHeight() > 0) { return; } double minWidth = Math.max(0, computeMinWidth(getHeight()) + (dialog.getWidth() - customScene.getWidth())); double minHeight = Math.max(0, computeMinHeight(getWidth()) + (dialog.getHeight() - customScene.getHeight())); dialog.setMinWidth(minWidth); dialog.setMinHeight(minHeight); } }
boolean setStageHeight(Stage stage, double height) { if (height >= stage.getMinHeight()) { stage.setHeight(height); initY = newY; return true; } return false; }
boolean setStageHeight(double height) { if (height >= primaryStage.getMinHeight() && height >= buttonsContainer.getHeight()) { primaryStage.setHeight(height); // initY = newY; return true; } else if (height >= primaryStage.getMinHeight() && height <= buttonsContainer.getHeight()) { height = buttonsContainer.getHeight(); primaryStage.setHeight(height); } return false; }
@Override public void layoutChildren() { super.layoutChildren(); if (dialog.getMinWidth() > 0 && dialog.getMinHeight() > 0) { return; } double minWidth = Math.max(0, computeMinWidth(getHeight()) + (dialog.getWidth() - customScene.getWidth())); double minHeight = Math.max(0, computeMinHeight(getWidth()) + (dialog.getHeight() - customScene.getHeight())); dialog.setMinWidth(minWidth); dialog.setMinHeight(minHeight); } }
if (Cursor.DEFAULT.equals(cursorEvent) == false) { if ((Cursor.W_RESIZE.equals(cursorEvent) == false) && (Cursor.E_RESIZE.equals(cursorEvent) == false)) { double minHeight = stage.getMinHeight() > (border * 2) ? stage.getMinHeight() : (border * 2); if ((Cursor.NW_RESIZE.equals(cursorEvent) == true) || (Cursor.N_RESIZE.equals(cursorEvent) == true) || (Cursor.NE_RESIZE.equals(cursorEvent) == true)) { if ((stage.getHeight() > minHeight) || (mouseEventY < 0)) {
primaryStage.setMinHeight(primaryStage.getHeight()); primaryStage.setMinWidth(primaryStage.getWidth()); primaryStage.setTitle("My mininal size is: W"+ primaryStage.getMinWidth()+" H"+primaryStage.getMinHeight());