javafx.scene.layout.HBox.getStyleClass()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(9.6k)|赞(0)|评价(0)|浏览(173)

本文整理了Java中javafx.scene.layout.HBox.getStyleClass()方法的一些代码示例,展示了HBox.getStyleClass()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HBox.getStyleClass()方法的具体详情如下:
包路径:javafx.scene.layout.HBox
类名称:HBox
方法名:getStyleClass

HBox.getStyleClass介绍

暂无

代码示例

代码示例来源:origin: jfoenixadmin/JFoenix

/**
 * creates empty tool bar
 */
public JFXToolbar() {
  initialize();
  this.setLeft(leftBox);
  leftBox.getStyleClass().add("tool-bar-left-box");
  leftBox.setPickOnBounds(false);
  this.setRight(rightBox);
  rightBox.getStyleClass().add("tool-bar-right-box");
  rightBox.setPickOnBounds(false);
  JFXDepthManager.setDepth(this, 1);
}

代码示例来源:origin: jfoenixadmin/JFoenix

yearLabelContainer.getStyleClass().add("spinner");
yearLabelContainer.getChildren().addAll(selectedYearLabel);
yearLabelContainer.setAlignment(Pos.CENTER_LEFT);
selectedDateContainer.getStyleClass().add("spinner");
selectedDateContainer.setAlignment(Pos.CENTER_LEFT);
selectedDateContainer.setOnMouseClicked((click) -> {

代码示例来源:origin: jfoenixadmin/JFoenix

private void initializeContainers(Node node, boolean fullScreen, boolean max, boolean min) {
  buttonsContainer = new HBox();
  buttonsContainer.getStyleClass().add("jfx-decorator-buttons-container");
  buttonsContainer.setBackground(new Background(new BackgroundFill(Color.BLACK,
    CornerRadii.EMPTY,
  graphicTextContainer.getStyleClass().add("jfx-decorator-title-container");
  graphicTextContainer.setAlignment(Pos.CENTER_LEFT);
  graphicTextContainer.setPickOnBounds(false);

代码示例来源:origin: jfoenixadmin/JFoenix

selectedTimeContainer.getStyleClass().add("spinner");
selectedTimeContainer.getChildren()
  .addAll(selectedHourLabel, separatorLabel, selectedMinLabel);

代码示例来源:origin: jfoenixadmin/JFoenix

backgroundProperty().addListener(observable -> JFXNodeUtils.updateBackground(getBackground(), clip));
container.getStyleClass().add("buttons-container");
container.getChildren().add(new Label("Selection Path..."));
container.setAlignment(Pos.CENTER_LEFT);

代码示例来源:origin: torakiki/pdfsam

private HBox createLine(Node... items) {
  HBox item = new HBox(items);
  item.getStyleClass().addAll(Style.VITEM.css());
  item.getStyleClass().addAll(Style.HCONTAINER.css());
  return item;
}

代码示例来源: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: torakiki/pdfsam

@Inject
  public PreferenceThumbnailsPane(
      @Named("thumbnailsCombo") PreferenceComboBox<KeyStringValueItem<String>> thumbnailsCombo,
      @Named("highQualityThumbnails") PreferenceCheckBox highQualityThumbnails,
      @Named("thumbnailsSize") PreferenceIntTextField thumbSize) {
    I18nContext i18n = DefaultI18nContext.getInstance();

    highQualityThumbnails.setTooltip(new Tooltip(i18n.i18n("Generate high quality thumbnails (slower)")));
    highQualityThumbnails.getStyleClass().add("spaced-vitem");

    HBox second = new HBox(new Label(i18n.i18n("Size in px:")), thumbSize);
    second.getStyleClass().addAll(Style.HCONTAINER.css());
    second.getStyleClass().addAll(Style.VITEM.css());

    thumbnailsCombo.setTooltip(new Tooltip(i18n.i18n("Library used to generate thumbnails")));
    getChildren().addAll(highQualityThumbnails, second, new Label(i18n.i18n("Thumbnails creator:")),
        thumbnailsCombo);
    getStyleClass().addAll(Style.CONTAINER.css());
  }
}

代码示例来源:origin: jfoenixadmin/JFoenix

inner.getChildren().setAll(tabLabel, closeButton);
inner.setAlignment(Pos.CENTER);
inner.getStyleClass().add("tab-container");
inner.setRotate(getSkinnable().getSide().equals(Side.BOTTOM) ? 180.0F : 0.0F);

代码示例来源:origin: stackoverflow.com

keyRow.getStyleClass().add("key-row");

代码示例来源:origin: torakiki/pdfsam

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);
}

代码示例来源:origin: torakiki/pdfsam

helpIcon(i18n.i18n("Select a directory where documents will be saved and loaded by default")));
HBox.setHgrow(workingDirectory, Priority.ALWAYS);
workigDirPane.getStyleClass().add("with-help-hcontainer");
    i18n.i18n("Select a previously saved workspace that will be automatically loaded at startup")));
HBox.setHgrow(workspace, Priority.ALWAYS);
workspaceDirPane.getStyleClass().add("with-help-hcontainer");
workspace.getTextField().validProperty().addListener((o, oldVal, newVal) -> {
  saveWorkspaceOnExit

代码示例来源:origin: torakiki/pdfsam

@Inject
public OpenWithDialog(StylesConfig styles, List<Module> modules) {
  initModality(Modality.WINDOW_MODAL);
  initStyle(StageStyle.UTILITY);
  setResizable(false);
  setTitle(DefaultI18nContext.getInstance().i18n("Open with"));
  this.modules = modules.stream().sorted(comparing(m -> m.descriptor().getName())).collect(toList());
  messageTitle.getStyleClass().add("-pdfsam-open-with-dialog-title");
  BorderPane containerPane = new BorderPane();
  containerPane.getStyleClass().addAll(Style.CONTAINER.css());
  containerPane.getStyleClass().addAll("-pdfsam-open-with-dialog", "-pdfsam-open-with-container");
  containerPane.setTop(messageTitle);
  BorderPane.setAlignment(messageTitle, Pos.TOP_CENTER);
  filesList.setPrefHeight(150);
  containerPane.setCenter(filesList);
  buttons.getStyleClass().addAll(Style.CONTAINER.css());
  containerPane.setBottom(buttons);
  BorderPane.setAlignment(buttons, Pos.CENTER);
  Scene scene = new Scene(containerPane);
  scene.getStylesheets().addAll(styles.styles());
  scene.setOnKeyReleased(new HideOnEscapeHandler(this));
  setScene(scene);
  eventStudio().addAnnotatedListeners(this);
}

代码示例来源:origin: torakiki/pdfsam

HBox bottom = new HBox(labelDate);
bottom.setAlignment(Pos.CENTER_LEFT);
bottom.getStyleClass().add("news-box-footer");
if (isNotBlank(data.getLink())) {
  Button link = UrlButton.urlButton(null, data.getLink(), FontAwesomeIcon.EXTERNAL_LINK_SQUARE,

代码示例来源:origin: torakiki/pdfsam

private HBox buildFooter() {
  Button closeButton = new Button(DefaultI18nContext.getInstance().i18n("Close"));
  closeButton.getStyleClass().addAll(Style.BUTTON.css());
  closeButton.setTextAlignment(TextAlignment.CENTER);
  closeButton.setOnAction(e -> eventStudio().broadcast(activeteCurrentModule()));
  HBox footer = new HBox(closeButton);
  footer.getStyleClass().addAll(Style.CLOSE_FOOTER.css());
  return footer;
}

代码示例来源:origin: torakiki/pdfsam

public HidingPane() {
    Button closeButton = new Button(DefaultI18nContext.getInstance().i18n("Close"));
    closeButton.getStyleClass().addAll(Style.BUTTON.css());
    closeButton.setTextAlignment(TextAlignment.CENTER);
    closeButton.setOnAction(e -> this.setVisible(false));
    HBox bottom = new HBox(closeButton);
    bottom.setAlignment(Pos.CENTER_RIGHT);
    bottom.getStyleClass().addAll(Style.CONTAINER.css());
    super.setBottom(bottom);
  }
}

代码示例来源:origin: torakiki/pdfsam

public ConfirmationDialog(StylesConfig styles, DialogStyle style, String positiveButtonText,
    String negativeButtonText) {
  initModality(Modality.WINDOW_MODAL);
  initStyle(StageStyle.UTILITY);
  setResizable(false);
  this.dialogContent = new ConfirmationDialogContent(style.icon);
  VBox containerPane = new VBox();
  containerPane.getStyleClass().addAll(Style.CONTAINER.css());
  containerPane.getStyleClass().addAll("-pdfsam-dialog", style.style);
  HBox buttons = new HBox(buildPositiveButton(positiveButtonText, true),
      buildCancelButton(negativeButtonText, false));
  buttons.getStyleClass().add("-pdfsam-dialog-buttons");
  containerPane.getChildren().addAll(dialogContent, buttons);
  Scene scene = new Scene(containerPane);
  scene.getStylesheets().addAll(styles.styles());
  setScene(scene);
}

代码示例来源:origin: torakiki/pdfsam

versionPane.getStyleClass().addAll(Style.VITEM.css());
versionPane.getStyleClass().addAll(Style.HCONTAINER.css());
advancedPanel.getChildren().add(compress);
discardBookmarks.ifPresent(advancedPanel.getChildren()::add);

代码示例来源:origin: PhoenicisOrg/phoenicis

private HBox createWaitPanel() {
  final ProgressIndicator progressIndicator = new ProgressIndicator();
  progressIndicator.getStyleClass().add("waiting-indicator");
  final HBox waitPanel = new HBox(progressIndicator);
  waitPanel.getStyleClass().add("rightPane");
  return waitPanel;
}

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

protected HBox buildSelector() {
 HBox selector = new HBox();
 selector.getStyleClass().add("wizard-form-fieldset-selector");
 // displayed only if have more than one bloc
 selector.managedProperty().bind(Bindings.size(fieldsets).greaterThan(1));
 return selector;
}

相关文章