selectedHourLabel.setOnMouseClicked((click) -> unit.set(TimeUnit.HOURS)); selectedHourLabel.setMinWidth(49); selectedHourLabel.setAlignment(Pos.CENTER_RIGHT); timeLabel.set(selectedHourLabel);
colorPickerGrid = new JFXColorGrid(); colorPickerGrid.getChildren().get(0).requestFocus(); customColorLabel.setAlignment(Pos.CENTER_LEFT); customColorLink.setPrefWidth(colorPickerGrid.prefWidth(-1)); customColorLink.setAlignment(Pos.CENTER);
sizeLabel.setMinWidth(25); sizeLabel.setPrefWidth(sizeCalculator.getWidth()); sizeLabel.setAlignment(Pos.BASELINE_RIGHT);
public RegionWithTitle(String title) { this.title = title; label = new Label(title); label.getStyleClass().add("calendar-bar-title"); getChildren().add(label); expandedStateLabel = new Label(); expandedStateLabel.getStyleClass().add("calendar-expand-state"); expandedStateLabel.setMinSize(STATE_LABEL_SIZE, STATE_LABEL_SIZE); expandedStateLabel.setPrefSize(STATE_LABEL_SIZE, STATE_LABEL_SIZE); expandedStateLabel.setAlignment(Pos.CENTER); setExpanded(true); getChildren().add(expandedStateLabel); }
@Nonnull public static Label placeholder(@Nonnull String text) { Label placeholder = new Label(text); placeholder.setFont(new Font(30.0)); placeholder.setTextFill(Color.gray(0.4)); placeholder.setTextAlignment(TextAlignment.CENTER); placeholder.setAlignment(Pos.CENTER); placeholder.setStyle("-fx-background-color: #f8f8f8"); return placeholder; }
public LineInfo() { this.markerLabel = new Label(); this.markerLabel.setPrefWidth(20); this.lineText = new Label(); this.lineText.getStyleClass().add("line-ruler-text"); //$NON-NLS-1$ this.lineText.setMaxWidth(Double.MAX_VALUE); this.lineText.setMaxHeight(Double.MAX_VALUE); this.lineText.setAlignment(Pos.CENTER_RIGHT); HBox.setHgrow(this.lineText, Priority.ALWAYS); getChildren().addAll(this.markerLabel, this.lineText); }
private Node createDecorationNode(ValidationMessage message) { Node graphic = Severity.ERROR == message.getSeverity() ? createErrorNode() : createWarningNode(); graphic.setStyle(SHADOW_EFFECT); Label label = new Label(); label.setGraphic(graphic); label.setTooltip(createTooltip(message)); label.setAlignment(Pos.CENTER); return label; }
@Override public Node apply(int idx) { Val<String> formatted = nParagraphs.map(n -> format(idx+1, n)); Label lineNo = new Label(); lineNo.setFont(DEFAULT_FONT); lineNo.setBackground(DEFAULT_BACKGROUND); lineNo.setTextFill(DEFAULT_TEXT_FILL); lineNo.setPadding(DEFAULT_INSETS); lineNo.setAlignment(Pos.TOP_RIGHT); lineNo.getStyleClass().add("lineno"); // bind label's text to a Val that stops observing area's paragraphs // when lineNo is removed from scene lineNo.textProperty().bind(formatted.conditionOnShowing(lineNo)); return lineNo; }
private Node buildTile(final IconFont iconFont) { final VBox box = new VBox(); box.setAlignment(Pos.CENTER); box.setPrefSize(100, 50); final Label icon = new Label(); iconFont.use(icon); icon.setPadding(new Insets(4)); icon.setAlignment(Pos.CENTER); VBox.setVgrow(icon, Priority.ALWAYS); final Label text = new Label(iconFont.name()); text.setAlignment(Pos.BOTTOM_CENTER); VBox.setVgrow(text, Priority.SOMETIMES); text.setTooltip(new Tooltip(iconFont.name())); box.getChildren().addAll(icon, text); // box.setStyle("-fx-background-color:red;"); return box; }
this.nameProperty.getStyleClass().addAll("preview", "resourceName"); //$NON-NLS-1$//$NON-NLS-2$ this.nameProperty.setPrefWidth(Double.MAX_VALUE); this.nameProperty.setAlignment(Pos.CENTER);
this.nameProperty.getStyleClass().addAll("preview", "resourceName"); //$NON-NLS-1$//$NON-NLS-2$ this.nameProperty.setPrefWidth(Double.MAX_VALUE); this.nameProperty.setAlignment(Pos.CENTER);
label.setAlignment(Pos.CENTER); if (canEnlargeCityWalls()) { template = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.cityhall.TownInfoNotice.confirm", new Object[]{}, locale.getCurrentLocal()); label.setAlignment(Pos.CENTER); if (canHaveMoreGuards()) { template = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.cityhall.TownInfoNotice.confirm", new Object[]{}, locale.getCurrentLocal()); label.setAlignment(Pos.CENTER); label.setOnMouseReleased((evt) -> { if (selectionBox != null) { label.setAlignment(Pos.CENTER); label.setOnMouseReleased((evt) -> { if (selectionBox != null) {
messageLabel.setPrefSize(420, 56); messageLabel.setWrapText(true); messageLabel.setAlignment(Pos.TOP_LEFT); progressPane.getChildren().add(messageLabel);
selectedHourLabel.setOnMouseClicked((click) -> unit.set(TimeUnit.HOURS)); selectedHourLabel.setMinWidth(49); selectedHourLabel.setAlignment(Pos.CENTER_RIGHT); timeLabel.set(selectedHourLabel);
titleLabel.getStyleClass().addAll("line-1"); //$NON-NLS-1$ titleLabel.setWrapText(true); titleLabel.setAlignment(Pos.TOP_LEFT); GridPane.setVgrow(titleLabel, Priority.NEVER); messageLabel.getStyleClass().addAll("line-2"); //$NON-NLS-1$ messageLabel.setWrapText(true); messageLabel.setAlignment(Pos.TOP_LEFT); messageLabel.setMaxHeight(Double.MAX_VALUE); GridPane.setVgrow(messageLabel, Priority.SOMETIMES);
infoLabel.setAlignment(Pos.TOP_LEFT); infoLabel.getStyleClass().add("info"); //$NON-NLS-1$ infoLabel.textProperty().bind(control.textProperty());
title.textProperty().bind(popOver.titleProperty()); title.setMaxSize(MAX_VALUE, MAX_VALUE); title.setAlignment(Pos.CENTER); title.getStyleClass().add("text"); //$NON-NLS-1$ popOver.detachedProperty().or(popOver.headerAlwaysVisibleProperty()))); closeIcon.getStyleClass().add("icon"); //$NON-NLS-1$ closeIcon.setAlignment(CENTER_LEFT); closeIcon.getGraphic().setOnMouseClicked(evt -> popOver.hide());
colorPickerGrid = new JFXColorGrid(); colorPickerGrid.getChildren().get(0).requestFocus(); customColorLabel.setAlignment(Pos.CENTER_LEFT); customColorLink.setPrefWidth(colorPickerGrid.prefWidth(-1)); customColorLink.setAlignment(Pos.CENTER);