/** * Create a Node that forces vertical spacing. * @param heigth of the spacing node. * @return Node with specified <code>heigth</code>. */ public Node createVerticalSpacer(int heigth) { return new PlaceHolder(1, heigth); }
private Group createSubTitle() { Group g = new Group(); g.setManaged(false); String template = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.CityProductionConsumptionDialog.weekly", new Object[]{}, locale.getCurrentLocal()); DecoratedText text = textFactory.createDecoratedText(template, new HashMap<>()); StackPane titlePane = new StackPane(); titlePane.getChildren().addAll(new PlaceHolder(WIDTH, 1), text); g.getChildren().add(titlePane); return g; }
public CloseButtonDialog() { super(); title = new SimpleStringProperty(this,"title", ""); closeLabel = new SimpleStringProperty(this,"closeLabel", ""); Label titleLbl = new Label(); titleLbl.getStyleClass().add("dialogTitle"); titleLbl.textProperty().bind(title); StackPane titlePane = new StackPane(); titlePane.setLayoutY(2*FRAME_BORDER); titlePane.getChildren().addAll(new PlaceHolder(WIDTH, 1), titleLbl); getContent().add(titlePane); closeButton = new OpenPatricianSmallWaxButton("X"); closeButton.getStyleClass().add("closeButton"); closeButton.setLayoutX(WIDTH - CLOSE_BUTTON_WIDTH - CLOSE_BUTTON_PADDING); closeButton.setLayoutY(CLOSE_BTN_Y_POS); closeButton.setOnAction(event -> { try { executeOnCloseButtonClicked(); } catch (RuntimeException e) { logger.error("Failed to close dialog", e); } }); closeButton.getStyleClass().add("buttonLabel"); getContent().add(closeButton); }
PlaceHolder ph = new PlaceHolder(30, 1); row.getChildren().addAll(question, ph, yesButton, noButton);
Pane centerPane = dialogHelper.center(header); box = new VBox(centerPane, new PlaceHolder(1, 10)); List<ITradingOffice> offices = this.offices.findOwnedBy(member); ITradingOffice oldest = null; text.setId("summary"); box.getChildren().add(text); box.getChildren().add(new PlaceHolder(1, 30)); IPersonalData personalData = member.getPersonalData(); template = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.guild.GuildMembersDialog.age", box.getChildren().add(text); box.getChildren().add(new PlaceHolder(1, 20));
frame.setPreserveRatio(true); pane.getChildren().addAll(background, portrait, frame); PlaceHolder ph = new PlaceHolder((WRAPPING_WIDTH - 200)/2, 1); centered.setLeft(ph); centered.setId("portrait");
StackPane titlePane = new StackPane(); titlePane.setLayoutY(60); titlePane.getChildren().addAll(new PlaceHolder(WIDTH, 1), titleLbl); getContent().add(titlePane);
AnchorPane.setRightAnchor(nextLbl, control.getPaddingLocal().getRight()); final BorderPane overAllLayout = new BorderPane(); PlaceHolder placeHolder = new PlaceHolder(1, contentHeight.doubleValue()); placeHolder.heightLocalProperty().bind(contentHeight); overAllLayout.setPadding(new Insets(DROP_SHADOW_PADDING));
frame.setPreserveRatio(true); pane.getChildren().addAll(background, portrait, frame); PlaceHolder ph = new PlaceHolder((WRAPPING_WIDTH - 200)/2, 1); centered.setLeft(ph); addNode(centered, "portrait");