boolean setStageWidth(double width) { if (width >= primaryStage.getMinWidth() && width >= buttonsContainer.getMinWidth()) { primaryStage.setWidth(width); // initX = newX; return true; } else if (width >= primaryStage.getMinWidth() && width <= buttonsContainer.getMinWidth()) { width = buttonsContainer.getMinWidth(); primaryStage.setWidth(width); } 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 setStageWidth(Stage stage, double width) { if (width >= stage.getMinWidth()) { stage.setWidth(width); initX = newX; return true; } return false; }
boolean setStageWidth(double width) { if (width >= primaryStage.getMinWidth() && width >= buttonsContainer.getMinWidth()) { primaryStage.setWidth(width); // initX = newX; return true; } else if (width >= primaryStage.getMinWidth() && width <= buttonsContainer.getMinWidth()) { width = buttonsContainer.getMinWidth(); primaryStage.setWidth(width); } 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); } }
primaryStage.setMinHeight(primaryStage.getHeight()); primaryStage.setMinWidth(primaryStage.getWidth()); primaryStage.setTitle("My mininal size is: W"+ primaryStage.getMinWidth()+" H"+primaryStage.getMinHeight());
double minWidth = stage.getMinWidth() > (border * 2) ? stage.getMinWidth() : (border * 2); if ((Cursor.NW_RESIZE.equals(cursorEvent) == true) || (Cursor.W_RESIZE.equals(cursorEvent) == true) || (Cursor.SW_RESIZE.equals(cursorEvent) == true)) { if ((stage.getWidth() > minWidth) || (mouseEventX < 0)) {