public BrowsableField() { HBox.setHgrow(textField, Priority.ALWAYS); this.getStyleClass().add("browsable-field"); validableContainer = new HBox(textField); validableContainer.getStyleClass().add("validable-container"); textField.getStyleClass().add("validable-container-field"); browseButton = new Button(DefaultI18nContext.getInstance().i18n("Browse")); browseButton.getStyleClass().addAll(Style.BROWSE_BUTTON.css()); browseButton.prefHeightProperty().bind(validableContainer.heightProperty()); browseButton.setMaxHeight(USE_PREF_SIZE); browseButton.setMinHeight(USE_PREF_SIZE); HBox.setHgrow(validableContainer, Priority.ALWAYS); textField.validProperty().addListener((o, oldValue, newValue) -> { if (newValue == ValidationState.INVALID) { validableContainer.getStyleClass().addAll(Style.INVALID.css()); } else { validableContainer.getStyleClass().removeAll(Style.INVALID.css()); } }); textField.focusedProperty().addListener( (o, oldVal, newVal) -> validableContainer.pseudoClassStateChanged(SELECTED_PSEUDOCLASS_STATE, newVal)); getChildren().addAll(validableContainer, browseButton); }
public PasswordFieldPopupContent() { getStyleClass().setAll("pdfsam-input-password-content"); passwordField.setPromptText(DefaultI18nContext.getInstance().i18n("Enter the user password")); Button doneButton = FontAwesomeIconFactory.get().createIconButton(FontAwesomeIcon.UNLOCK, DefaultI18nContext.getInstance().i18n("Unlock")); doneButton.getStyleClass().addAll(Style.BUTTON.css()); doneButton.prefHeightProperty().bind(passwordField.heightProperty()); doneButton.setMaxHeight(USE_PREF_SIZE); doneButton.setMinHeight(USE_PREF_SIZE); doneButton.setOnAction(e -> requestLoad()); passwordField.setOnAction(e -> requestLoad()); getChildren().addAll(passwordField, doneButton); }
rssWebView.prefHeightProperty().addListener((observableValue, number, number2) -> stage.setHeight((double) number2 + closeButton.prefHeightProperty().doubleValue() + 85));
navigation.setAlignment(Pos.TOP_LEFT); Button back = new Button("",uniformDesign.createIcon(FontAwesome.Glyph.CARET_LEFT)); back.prefHeightProperty().bind(breadCrumbBar.heightProperty().add(1)); back.setOnAction(event -> dataEditor.back()); back.setDisable(!previousData.isPresent()); Button next = new Button("",uniformDesign.createIcon(FontAwesome.Glyph.CARET_RIGHT)); next.prefHeightProperty().bind(breadCrumbBar.heightProperty().add(1)); next.setDisable(!nextData.isPresent()); next.setOnAction(event -> dataEditor.next());