javafx.collections.ObservableList.isEmpty()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(218)

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

ObservableList.isEmpty介绍

暂无

代码示例

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

public void reGroup() {
  if (!groupOrder.isEmpty()) {
    ArrayList<TreeTableColumn<S, ?>> tempGroups = new ArrayList<>(groupOrder);
    groupOrder.clear();
    group(tempGroups.toArray(new TreeTableColumn[0]));
  }
}

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

private List<TreeTableColumn<S, ?>> getLeaves(TreeTableColumn<S, ?> root) {
    List<TreeTableColumn<S, ?>> columns = new ArrayList<>();
    if (root.getColumns().isEmpty()) {
      //We only want the leaves that are editable.
      if (root.isEditable()) {
        columns.add(root);
      }
      return columns;
    } else {
      for (TreeTableColumn<S, ?> column : root.getColumns()) {
        columns.addAll(getLeaves(column));
      }
      return columns;
    }
  }
}

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

public ObservableList<Node> getContent() {
  if (contentHolder.getChildren().isEmpty()) {
    updateContent();
  }
  return content.getChildren();
}

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

private void removeTabs(List<? extends Tab> removedTabs) {
  for (Tab tab : removedTabs) {
    TabHeaderContainer tabHeaderContainer = header.getTabHeaderContainer(tab);
    if (tabHeaderContainer != null) {
      tabHeaderContainer.isClosing = true;
      removeTab(tab);
      // if tabs list is empty hide the header container
      if (getSkinnable().getTabs().isEmpty()) {
        header.setVisible(false);
      }
    }
  }
  this.removedTabs = !removedTabs.isEmpty();
}

代码示例来源:origin: speedment/speedment

@Override
  public void populate(MenuBar menuBar) {
    final ObservableList<Menu> menus = menuBar.getMenus();
    menus.clear();

    for (final MenuBarTab tab : handlers.keySet()) {
      final Menu menu = new Menu(tab.getText());
      handlers.get(tab).populate(menu);
      if (!menu.getItems().isEmpty()) {
        menus.add(menu);
      }
    }
  }
}

代码示例来源:origin: speedment/speedment

if (menu.getItems().isEmpty()) {
  return Optional.empty();
} else {

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

public void setContent(Node... content) {
  this.content.getChildren().setAll(content);
  if (contentHolder.getChildren().isEmpty()) {
    updateContent();
  }
}

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

@Override
protected double computePrefHeight(double width) {
  if (!getChildren().isEmpty()) {
    return getChildren().get(0).prefHeight(width);
  }
  return super.computePrefHeight(width);
}

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

protected TableColumnHeader createTableColumnHeader(TableColumnBase col) {
  return col.getColumns().isEmpty() ?
    new JFXTableColumnHeader(getTableViewSkin(), col) :
    new NestedTableColumnHeader(getTableViewSkin(), col);
}

代码示例来源:origin: speedment/speedment

});
if (!translators.getChildren().isEmpty()) {
  item.getChildren().add(translators);
    .forEachOrdered(dbmsTypes.getChildren()::add);
});
if (!dbmsTypes.getChildren().isEmpty()) {
  item.getChildren().add(dbmsTypes);
    .forEachOrdered(typeMappers.getChildren()::add);
});
if (!typeMappers.getChildren().isEmpty()) {
  item.getChildren().add(typeMappers);

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

@Override
protected double computePrefWidth(double height) {
  if (!getChildren().isEmpty()) {
    return getChildren().get(0).prefWidth(height);
  }
  return super.computePrefWidth(height);
}

代码示例来源:origin: speedment/speedment

/**
   * Creates a new {@link PropertySheet} which will render a collection of 
   * properties.
   * 
   * @param properties  the list of properties to render
   */
  public PropertySheet(ObservableList<PropertyEditor.Item> properties) {
    requireNonNull(properties);
    
    this.properties = FXCollections.unmodifiableObservableList(properties);
    
    layout = new PropertyLayout(properties);
    setCenter(layout);
    
    this.properties.addListener((ListChangeListener.Change<? extends PropertyEditor.Item> c) -> {
      while (c.next()) {
        if (c.wasRemoved() && properties.isEmpty()) {
          layout.remove();
          layout = new PropertyLayout(properties);
          setCenter(layout);
        } else if (c.wasAdded()) {
          c.getAddedSubList().stream()
            .forEachOrdered(i -> layout.addItem(i));
        }
      }
    });
  }
}

代码示例来源:origin: speedment/speedment

properties.clear();
if (!change.getList().isEmpty()) {
  final TreeItem<DocumentProperty> treeItem = 
    change.getList().get(0);

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

if(!list.isEmpty()) {
  comboBox.show();

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

if (!autoCompletePopup.getFilteredSuggestions().isEmpty()) {
        autoCompletePopup.show(editor);
if (autoCompletePopup.getFilteredSuggestions().isEmpty()) {
  autoCompletePopup.hide();
} else {

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

if (!((RecursiveTreeItem) child).originalItems.isEmpty()) {
  RecursiveTreeItem<T> filterableChild = (RecursiveTreeItem<T>) child;
  filterableChild.setPredicate(predicate.get());

代码示例来源:origin: speedment/speedment

while (!notifications.isEmpty()) {
  final Notification n = notifications.get(0);
  NotificationController.showNotification(

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

private void buildCustomColors() {
  final ObservableList<Color> customColors = colorPicker.getCustomColors();
  customColorGrid.getChildren().clear();
  if (customColors.isEmpty()) {
    customColorLabel.setVisible(false);
    customColorLabel.setManaged(false);

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

@Override
  protected boolean computeValue() {
    return logView.getSelectionModel().getSelectedItems().isEmpty();
  }
});

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

public void scrollToBottomIfShowing() {
    if (!getItems().isEmpty()
        && ofNullable(this.getScene()).map(Scene::getWindow).map(Window::isShowing).orElse(Boolean.TRUE)) {
      scrollTo(getItems().size() - 1);
    }
  }
}

相关文章