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

x33g5p2x  于2022-01-31 转载在 其他  
字(7.2k)|赞(0)|评价(0)|浏览(169)

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

VBox.visibleProperty介绍

暂无

代码示例

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

/**
 * {@inheritDoc}
 */
@Override
public Property<Boolean> visibleProperty() {
 return wrapper.visibleProperty();
}

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

@Inject
public ContentPane(WorkArea modules, Dashboard dashboard, NewsPanel news,
    @Named("defaultDashboardItemId") String defaultDasboardItem) {
  this.modules = modules;
  this.dashboard = dashboard;
  this.newsContainer = new VBox(news);
  this.newsContainer.getStyleClass().add("news-container");
  StackPane stack = new StackPane(modules, dashboard);
  setHgrow(stack, Priority.ALWAYS);
  newsContainer.managedProperty().bind(newsContainer.visibleProperty());
  newsContainer.setVisible(false);
  fadeIn = new FadeTransition(new Duration(300), newsContainer);
  fadeIn.setFromValue(0);
  fadeIn.setToValue(1);
  fadeOut = new FadeTransition(new Duration(300), newsContainer);
  fadeOut.setFromValue(1);
  fadeOut.setToValue(0);
  fadeOut.setOnFinished(e -> {
    newsContainer.setVisible(false);
  });
  getChildren().addAll(stack, newsContainer);
  eventStudio().addAnnotatedListeners(this);
  eventStudio().broadcast(new SetActiveDashboardItemRequest(defaultDasboardItem));
}

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

/**
 *
 */
private void plus(ActionEvent e) {
 subMenu.visibleProperty().set(true);
 plus.setVisible(false);
 minus.setVisible(true);
}

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

/**
  *
  */
 private void minusa(ActionEvent e) {
  subMenu.visibleProperty().set(false);
  plus.setVisible(true);
  minus.setVisible(false);
 }
}

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

/**
 * Constructor
 */
public FiedsetSelectorMenuRow() {
 getStyleClass().add("fieldset-selector-menu-row-wrapper");
 subMenu.managedProperty().bind(subMenu.visibleProperty());
 subMenu.getStyleClass().add("fieldset-selector-submenu-row-wrapper");
 subMenu.setVisible(false);
 getChildren().add(rowslayout);
 expandCollapseIcon.visibleProperty().bind(Bindings.size(submenus).greaterThan(0));
}

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

/**
 * {@inheritDoc}
 */
@Override
public void build(VLViewComponentXML blocConfig, IEmaginController controller) {
 final String rootView = blocConfig.getPropertyValue("viewId");
 if (StringUtils.isNotBlank(rootView)) {
  processedController = StandardViewUtils.forId((RootStructureController)controller.getRootStructure(), ((AbstractViewController) controller).getStructureContent(), rootView);
  final Pane processed = (Pane) processedController.processedView();
  Platform.runLater(() -> {
   wrapper.getChildren().add(processed);
   wrapper.managedProperty().bindBidirectional(wrapper.visibleProperty());
   NodeHelper.setHVGrow(wrapper, processed);
  });
 }
}

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

/**
 * When row on tableviw is selected this pane is shown on the right side. Make it smarter!! If on
 * mobile view, i should be show over the table view.
 */
private void buildRightPane() {
 rightPane.setStyle("-fx-background-color: white;" + "-fx-border-color: -divider-color; " + "-fx-border-width:0.5;" + "-fx-min-width: 500;");
 rightPane.managedProperty().bind(rightPane.visibleProperty());
 rightPane.setVisible(false);
 // setRight(rightPane);
 tableView.setRowFactory(param -> {
  final TableRow tableRow = new TableRow<>();
  tableRow.addEventFilter(MouseEvent.MOUSE_CLICKED, mouseClicked -> {
   if (mouseClicked.getClickCount() == 2) {
    rightPane.setVisible(true);
    final SimpleDetailsPane condensedDetailsPane = new SimpleDetailsPane();
    rightPane.getChildren().clear();
    rightPane.getChildren().add(condensedDetailsPane);
   }
  });
  return tableRow;
 });
}

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

/**
 * When row on tableviw is selected this pane is shown on the right side. Make it smarter!! If on
 * mobile view, i should be show over the table view.
 */
private void buildRightPane() {
 rightPane.setStyle("-fx-background-color: white;" + "-fx-border-color: -divider-color; " + "-fx-border-width:0.5;" + "-fx-min-width: 500;");
 rightPane.managedProperty().bind(rightPane.visibleProperty());
 rightPane.setVisible(false);
 // setRight(rightPane);
 tableView.setRowFactory(param -> {
  final TableRow tableRow = new TableRow<>();
  tableRow.addEventFilter(MouseEvent.MOUSE_CLICKED, mouseClicked -> {
   if (mouseClicked.getClickCount() == 2) {
    rightPane.setVisible(true);
    final SimpleDetailsPane condensedDetailsPane = new SimpleDetailsPane();
    rightPane.getChildren().clear();
    rightPane.getChildren().add(condensedDetailsPane);
   }
  });
  return tableRow;
 });
}

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

subMenu.managedProperty().bind(subMenu.visibleProperty());

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

private void buildProcessing() {
 waitingIndicator.maxHeightProperty().bind(waitingIndicator.maxWidthProperty());
 waitingIndicator.maxWidthProperty().set(30);
 BooleanBinding isWaiting = Bindings.equal(ProcessingState.WAITING, status);
 BooleanBinding isDoneError = Bindings.equal(ProcessingState.DONE_KO, status);
 doneOKLabel.visibleProperty().bind(Bindings.equal(ProcessingState.DONE_OK, status));
 waitingIndicator.visibleProperty().bind(Bindings.equal(ProcessingState.PROCESSING, status));
 allOverContainer.visibleProperty().bind(Bindings.or(isWaiting, isDoneError));
 // ok icon
 doneOKLabel.setText("DONE");
 status.addListener((ChangeListener<ProcessingState>) (observable, oldValue, newValue) -> {
  if (newValue == ProcessingState.DONE_KO) {
   pseudoClassStateChanged(PseudoClass.getPseudoClass("error"), true);
   pseudoClassStateChanged(PseudoClass.getPseudoClass("status"), false);
  } else if (newValue == ProcessingState.PROCESSING) {
   pseudoClassStateChanged(PseudoClass.getPseudoClass("status"), true);
   pseudoClassStateChanged(PseudoClass.getPseudoClass("error"), false);
  }
 });
}

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

private void buildProcessing() {
 waitingIndicator.maxHeightProperty().bind(waitingIndicator.maxWidthProperty());
 waitingIndicator.maxWidthProperty().set(30);
 BooleanBinding isWaiting = Bindings.equal(ProcessingState.WAITING, status);
 BooleanBinding isDoneError = Bindings.equal(ProcessingState.DONE_KO, status);
 doneOKLabel.visibleProperty().bind(Bindings.equal(ProcessingState.DONE_OK, status));
 waitingIndicator.visibleProperty().bind(Bindings.equal(ProcessingState.PROCESSING, status));
 allOverContainer.visibleProperty().bind(Bindings.or(isWaiting, isDoneError));
 // ok icon
 FontIcon fontIcon = new FontIcon();
 fontIcon.setStyle("-fx-icon-color:-accent-color-500;-fx-icon-code:mdi-check;-fx-icon-size:30;");
 doneOKLabel.setGraphic(fontIcon);
 status.addListener((ChangeListener<ProcessingState>) (observable, oldValue, newValue) -> {
  if (newValue == ProcessingState.DONE_KO) {
   pseudoClassStateChanged(PseudoClass.getPseudoClass("error"), true);
   pseudoClassStateChanged(PseudoClass.getPseudoClass("status"), false);
  }
  else if (newValue == ProcessingState.PROCESSING) {
   pseudoClassStateChanged(PseudoClass.getPseudoClass("status"), true);
   pseudoClassStateChanged(PseudoClass.getPseudoClass("error"), false);
  }
 });
}

相关文章