本文整理了Java中javafx.scene.control.Label.getStyleClass()
方法的一些代码示例,展示了Label.getStyleClass()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.getStyleClass()
方法的具体详情如下:
包路径:javafx.scene.control.Label
类名称:Label
方法名:getStyleClass
暂无
代码示例来源:origin: speedment/speedment
@Override
public Node view() {
final Label label = new Label(String.valueOf(character));
label.getStyleClass().add("glyph-icon");
return label;
}
}
代码示例来源:origin: speedment/speedment
private static Label log(String message, String type) {
final Label label = new Label(message);
label.getStyleClass().addAll("msg", type);
return label;
}
代码示例来源:origin: speedment/speedment
/**
* 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());
}
代码示例来源:origin: jfoenixadmin/JFoenix
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;
}
代码示例来源:origin: jfoenixadmin/JFoenix
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));
代码示例来源:origin: jfoenixadmin/JFoenix
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));
代码示例来源:origin: pmd/pmd
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());
});
}
代码示例来源:origin: jfoenixadmin/JFoenix
toast.getStyleClass().add("jfx-snackbar-toast");
toast.setWrapText(true);
toast.setText(message);
代码示例来源:origin: torakiki/pdfsam
private void addSectionTitle(String title, Pane pane) {
Label label = new Label(title);
label.getStyleClass().add("section-title");
pane.getChildren().add(label);
}
}
代码示例来源:origin: torakiki/pdfsam
private void addSectionTitle(String title, Pane pane) {
Label label = new Label(title);
label.getStyleClass().add("section-title");
pane.getChildren().add(label);
}
代码示例来源:origin: jfoenixadmin/JFoenix
displayNode.getStyleClass().add("color-label");
displayNode.setManaged(false);
displayNode.setMouseTransparent(true);
代码示例来源:origin: torakiki/pdfsam
protected static Label createValueLabel() {
Label ret = new Label();
ret.getStyleClass().add("info-property-value");
ret.setWrapText(true);
return ret;
}
}
代码示例来源:origin: torakiki/pdfsam
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;
}
代码示例来源:origin: jfoenixadmin/JFoenix
errorLabel.getStyleClass().add("error-label");
errorLabel.setWrapText(true);
代码示例来源:origin: jfoenixadmin/JFoenix
setManaged(false);
errorLabel.getStyleClass().add("error-label");
代码示例来源:origin: torakiki/pdfsam
@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));
}
}
}
代码示例来源:origin: torakiki/pdfsam
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");
}
代码示例来源:origin: torakiki/pdfsam
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;
}
代码示例来源:origin: torakiki/pdfsam
@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);
}
代码示例来源:origin: jfoenixadmin/JFoenix
tabLabel.getStyleClass().setAll("tab-label");
内容来源于网络,如有侵权,请联系作者删除!