@Override public Node view() { final Label label = new Label(String.valueOf(character)); label.getStyleClass().add("glyph-icon"); return label; } }
private static Label log(String message, String type) { final Label label = new Label(message); label.getStyleClass().addAll("msg", type); return label; }
/** * Initializes the controller class. */ @Override public void initialize(URL url, ResourceBundle rb) { notification.setText(message); notification.setGraphic(icon.view()); notification.getStyleClass().add(palette.name().toLowerCase()); }
protected BorderPane createCalendarMonthLabelPane() { monthYearLabel = new Label(); monthYearLabel.getStyleClass().add(SPINNER_LABEL); monthYearLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 13)); monthYearLabel.setTextFill(DEFAULT_COLOR); BorderPane monthContainer = new BorderPane(); monthContainer.setMinHeight(50); monthContainer.setCenter(monthYearLabel); monthContainer.setPadding(new Insets(2, 12, 2, 12)); return monthContainer; }
selectedYearLabel.getStyleClass().add(SPINNER_LABEL); selectedYearLabel.setTextFill(Color.rgb(255, 255, 255, 0.67)); selectedYearLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 14)); selectedDateLabel.getStyleClass().add(SPINNER_LABEL); selectedDateLabel.setTextFill(Color.WHITE); selectedDateLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 32));
selectedHourLabel.getStyleClass().add(SPINNER_LABEL); selectedHourLabel.setTextFill(Color.WHITE); selectedHourLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 42)); selectedMinLabel.getStyleClass().add(SPINNER_LABEL); selectedMinLabel.setTextFill(fadedColor); selectedMinLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 42)); periodPMLabel.getStyleClass().add(SPINNER_LABEL); periodPMLabel.setTextFill(fadedColor); periodPMLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 14)); periodAMLabel.getStyleClass().add(SPINNER_LABEL); periodAMLabel.setTextFill(fadedColor); periodAMLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 14));
public ToolbarTitledPane() { getStyleClass().add("tool-bar-title"); // change the default setCollapsible(false); toolBar.setPadding(Insets.EMPTY); Label titleLabel = new Label("Title"); titleLabel.textProperty().bind(title); titleLabel.getStyleClass().add("title-label"); toolBar.getItems().add(titleLabel); setGraphic(toolBar); // should be an empty string, binding prevents to set it textProperty().bind(Val.constant("")); // The toolbar is too large for the title region and is not // centered unless we bind the height, like follows Val.wrap(toolBar.parentProperty()) .values() .filter(Objects::nonNull) .subscribe(parent -> { // The title region is provided by the skin, // this is the only way to access it outside of css StackPane titleRegion = (StackPane) parent; toolBar.maxHeightProperty().unbind(); toolBar.maxHeightProperty().bind(titleRegion.heightProperty()); toolBar.minHeightProperty().unbind(); toolBar.minHeightProperty().bind(titleRegion.heightProperty()); toolBar.prefHeightProperty().unbind(); toolBar.prefHeightProperty().bind(titleRegion.heightProperty()); }); }
toast.getStyleClass().add("jfx-snackbar-toast"); toast.setWrapText(true); toast.setText(message);
private void addSectionTitle(String title, Pane pane) { Label label = new Label(title); label.getStyleClass().add("section-title"); pane.getChildren().add(label); } }
private void addSectionTitle(String title, Pane pane) { Label label = new Label(title); label.getStyleClass().add("section-title"); pane.getChildren().add(label); }
displayNode.getStyleClass().add("color-label"); displayNode.setManaged(false); displayNode.setMouseTransparent(true);
protected static Label createValueLabel() { Label ret = new Label(); ret.getStyleClass().add("info-property-value"); ret.setWrapText(true); return ret; } }
private Label buildLabel(String message, NotificationType type) { Label textLabel = new Label(message); textLabel.getStyleClass().add("notification-text"); if (type != null) { textLabel.getStyleClass().add(type.getStyleClass()); textLabel.setGraphic(type.getGraphic()); } return textLabel; }
errorLabel.getStyleClass().add("error-label"); errorLabel.setWrapText(true);
setManaged(false); errorLabel.getStyleClass().add("error-label");
@EventListener public void onPremiumModules(PremiumModulesEvent e) { if (!e.premiumModules.isEmpty()) { Label premiumTile = new Label(DefaultI18nContext.getInstance().i18n("Premium features")); premiumTile.getStyleClass().add("modules-tile-title"); FlowPane modulesPane = new FlowPane(); modulesPane.getStyleClass().add("dashboard-modules"); e.premiumModules.stream().sorted((a, b) -> a.getId() - b.getId()).map(PremiumModuleTile::new) .forEach(modulesPane.getChildren()::add); Platform.runLater(() -> this.getChildren().addAll(premiumTile, modulesPane)); } } }
ConfirmationDialogContent(MaterialDesignIcon icon) { getStyleClass().addAll(Style.CONTAINER.css()); messageTitle.getStyleClass().add("-pdfsam-dialog-title"); messageContent.getStyleClass().add("-pdfsam-dialog-message"); VBox messages = new VBox(messageTitle, messageContent); messages.getStyleClass().add("-pdfsam-dialog-messages"); getChildren().addAll(MaterialDesignIconFactory.get().createIcon(icon, "42.0"), messages); getStyleClass().addAll("-pdfsam-dialog-content"); }
protected static Label createTitleLabel(String text) { Label ret = new Label(DefaultI18nContext.getInstance().i18n(text) + ":"); ret.getStyleClass().add("info-property"); GridPane.setHalignment(ret, HPos.RIGHT); GridPane.setValignment(ret, VPos.TOP); return ret; }
@Inject public BannerPane(BannerButtons buttons, ImageView payoff, @Named("logo32") Image logo) { getStyleClass().add("pdfsam-banner"); current.getStyleClass().add("header-title"); HBox.setHgrow(buttons, Priority.ALWAYS); HBox logoView = new HBox(); logoView.getStyleClass().add("pdfsam-logo"); logoView.getChildren().addAll(new ImageView(logo), payoff); getChildren().addAll(logoView, current, buttons); eventStudio().addAnnotatedListeners(this); }
tabLabel.getStyleClass().setAll("tab-label");