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

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

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

HBox.pseudoClassStateChanged介绍

暂无

代码示例

代码示例来源: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: com.nexitia.emaginplatform/emagin-jfxcore-engine

/**
 * Remove all selection marker
 */
public void clearSelection() {
 pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), false);
 row.pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), false);
 label.pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), false);
 for(FieldsetSubmenuRow e: submenus) {
  e.clearSelection();
 }
}

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

internalLayout.getStyleClass().addAll("radio-buttons-internal-wrapper", "hand-hover");
if (!iterator.hasNext()) {
 internalLayout.pseudoClassStateChanged(PseudoClass.getPseudoClass("last"), true);

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

/**
 * Select the current row
 *
 * @param selected
 */
public void select() {
 pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), true);
 row.pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), true);
 label.pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), true);
 selectableCompsLayout.setSpacing(8);
 if (parentLayout.getChildren().size() > 1) {
  parentLayout.getChildren().remove(1);
 }
 parentLayout.getChildren().add(selectableCompsLayout);
 NodeHelper.setHVGrow(selectableCompsLayout);
 for(Node e: selectableCompsLayout.getChildren()) {
  e.setVisible(true);
 }
}

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

getChildren().add(contentSroll);
 NodeHelper.setVgrow(contentSroll);
 tabItemsContainer.pseudoClassStateChanged(PseudoClass.getPseudoClass("top"), true);
} else if (tabsPos == VLSimpleTabPos.LEFT) {
 getChildren().add(tabItemsContainer);
 getChildren().add(tabContentContainer);
 tabItemsContainer.pseudoClassStateChanged(PseudoClass.getPseudoClass("left"), true);
} else {
 contentSroll.setContent(tabContentContainer);
 getChildren().add(tabItemsContainer);
 NodeHelper.setHVGrow(contentSroll, tabContentContainer);
 tabItemsContainer.pseudoClassStateChanged(PseudoClass.getPseudoClass("bottom"), true);

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

rowWrapper.getStyleClass().add("ep-form-row-each");
if (!iterator.hasNext()) {
 rowWrapper.pseudoClassStateChanged(PseudoClass.getPseudoClass("last"), true);

相关文章