javafx.scene.control.TreeView.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(7.7k)|赞(0)|评价(0)|浏览(117)

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

TreeView.<init>介绍

暂无

代码示例

代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.code.editor.fx

private TreeView<OutlineItem> createView() {
  TreeView<OutlineItem> outlineView = new TreeView<>();
  outlineView.setShowRoot(false);
  outlineView.setCellFactory(this::createCell);
  return outlineView;
}

代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.code.editor.fx

private TreeView<OutlineItem> createView() {
  TreeView<OutlineItem> outlineView = new TreeView<>();
  outlineView.setShowRoot(false);
  outlineView.setCellFactory(this::createCell);
  return outlineView;
}

代码示例来源:origin: org.copper-engine/copper-monitoring-client

public WorkflowClassesTreeForm createWorkflowClassesTreeForm(WorkflowSummaryFilterController filterController) {
  TreeView<DisplayWorkflowClassesModel> workflowView = new TreeView<DisplayWorkflowClassesModel>();
  WorkflowClassesTreeController workflowClassesTreeController = createWorkflowClassesTreeController(workflowView);
  return new WorkflowClassesTreeForm("", new EmptyShowFormStrategy(), workflowClassesTreeController,
      filterController, workflowView, guiCopperDataProvider);
}

代码示例来源:origin: it.unibo.alchemist/alchemist-projectview

final TreeItem<String> root = new TreeItem<>(dir.getName(), new ImageView(SVGImageUtils.getSvgImage("icon/project.svg", TREE_ICON_WIDTH, TREE_ICON_HEIGHT)));
root.setExpanded(true);
this.treeView = new TreeView<>(root);
displayProjectContent(dir, root);
this.pane.getChildren().add(this.treeView);

代码示例来源:origin: com.aquafx-project/aquafx

TreeView<String> tree = new TreeView<String>(rootItem);
tree.setPrefHeight(150);
tree.setPrefWidth(150);

代码示例来源:origin: eu.agrosense.client/util-javafx

@Override
public void addNotify() {
  super.addNotify();
  em = ExplorerManager.find(this);
  if (em != null) {
    TreeItem<Node> rootItem = createFromNode(em.getRootContext());
    rootItem.setExpanded(true);
    final TreeView<Node> treeView = new TreeView<>(rootItem);
    treeView.setEditable(true);
    treeView.setShowRoot(rootVisible);
    treeView.setCellFactory(
        new Callback<TreeView<Node>, TreeCell<Node>>() {
          @Override
          public TreeCell<Node> call(final TreeView<Node> p) {
            return new TextFieldTreeCellImpl();
          }
        });
    Platform.runLater(new Runnable() {
      @Override
      public void run() {
        StackPane root = new StackPane();
        root.getChildren().add(treeView);
        Scene scene = new Scene(root, 300, 250);
        setScene(scene);
      }
    });
  }
}
// for custom cell editor with edit capabilities:

代码示例来源:origin: nl.cloudfarming.client/calendar-api

setMaxWidth(LIST_VIEW_WIDTH);
treeView = new TreeView<>(rootItem);
treeView.setCellFactory(createCellFactory(contextMenu));
treeView.setShowRoot(false);

代码示例来源:origin: com.aquafx-project/aquafx

TreeView<String> treeView = new TreeView<String>();
treeView.setRoot(root);
TreeView<String> treeView1 = new TreeView<String>();
treeView1.setRoot(root1);

代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls

/**
 * Create a new skin
 *
 * @param control
 *            the control
 * @param selectedItems
 *            the selected items
 */
public DirectoryTreeViewSkin(DirectoryTreeView control,
    ObservableList<DirItem> selectedItems) {
  super(control);
  this.selectedItems = selectedItems;
  this.tree = new TreeView<>();
  this.tree.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
  this.tree.setCellFactory((v) -> new SimpleTreeCell<@NonNull DirItem>(
      DirectoryTreeViewSkin::handleDirLabel, this::handleStyleclass));
  this.tree.setShowRoot(false);
  this.tree.getSelectionModel().getSelectedItems()
      .addListener(this::handleSelectionChange);
  this.tree.setOnMouseClicked( e -> {
    if( e.getClickCount() > 1 ) {
      openSelectedResources();
    }
  });
  getChildren().add(this.tree);
  control.rootDirectoriesProperty().addListener(this::rebuildTable);
  control.iconSizeProperty().addListener(this::rebuildTable);
  rebuildTable(control.rootDirectoriesProperty());
}

代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls

/**
 * Create a new skin
 *
 * @param control
 *            the control
 * @param selectedItems
 *            the selected items
 */
public ResourceTreeViewSkin(ResourceTreeView control,
    ObservableList<ResourceItem> selectedItems) {
  super(control);
  this.selectedItems = selectedItems;
  this.tree = new TreeView<>();
  this.tree.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
  this.tree.setCellFactory((v) -> new SimpleTreeCell<@NonNull ResourceItem>(
      ResourceTreeViewSkin::handleDirLabel, this::handleStyleclass));
  this.tree.setShowRoot(false);
  this.tree.getSelectionModel().getSelectedItems()
      .addListener(this::handleSelectionChange);
  this.tree.setOnMouseClicked( e -> {
    if( e.getClickCount() > 1 ) {
      openSelectedResources();
    }
  });
  getChildren().add(this.tree);
  control.rootDirectoriesProperty().addListener(this::rebuildTable);
  control.iconSizeProperty().addListener(this::rebuildTable);
  rebuildTable(control.rootDirectoriesProperty());
}

代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls

/**
 * Create a new skin
 *
 * @param control
 *            the control
 * @param selectedItems
 *            the selected items
 */
public DirectoryTreeViewSkin(DirectoryTreeView control,
    ObservableList<DirItem> selectedItems) {
  super(control);
  this.selectedItems = selectedItems;
  this.tree = new TreeView<>();
  this.tree.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
  this.tree.setCellFactory((v) -> new SimpleTreeCell<@NonNull DirItem>(
      DirectoryTreeViewSkin::handleDirLabel, this::handleStyleclass));
  this.tree.setShowRoot(false);
  this.tree.getSelectionModel().getSelectedItems()
      .addListener(this::handleSelectionChange);
  this.tree.setOnMouseClicked( e -> {
    if( e.getClickCount() > 1 ) {
      openSelectedResources();
    }
  });
  getChildren().add(this.tree);
  control.rootDirectoriesProperty().addListener(this::rebuildTable);
  control.iconSizeProperty().addListener(this::rebuildTable);
  rebuildTable(control.rootDirectoriesProperty());
}

代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls

/**
 * Create a new skin
 *
 * @param control
 *            the control
 * @param selectedItems
 *            the selected items
 */
public ResourceTreeViewSkin(ResourceTreeView control,
    ObservableList<ResourceItem> selectedItems) {
  super(control);
  this.selectedItems = selectedItems;
  this.tree = new TreeView<>();
  this.tree.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
  this.tree.setCellFactory((v) -> new SimpleTreeCell<@NonNull ResourceItem>(
      ResourceTreeViewSkin::handleDirLabel, this::handleStyleclass));
  this.tree.setShowRoot(false);
  this.tree.getSelectionModel().getSelectedItems()
      .addListener(this::handleSelectionChange);
  this.tree.setOnMouseClicked( e -> {
    if( e.getClickCount() > 1 ) {
      openSelectedResources();
    }
  });
  getChildren().add(this.tree);
  control.rootDirectoriesProperty().addListener(this::rebuildTable);
  control.iconSizeProperty().addListener(this::rebuildTable);
  rebuildTable(control.rootDirectoriesProperty());
}

代码示例来源:origin: com.aquafx-project/aquafx

TreeView<String> tree = new TreeView<String>(rootItem);
tree.setPrefHeight(250);
tree.setPrefWidth(400);

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

treeView = new TreeView<>();
final String treePaginatedDataProvider = contentConfiguration.getPropertyValue("dataLoader");

代码示例来源:origin: com.aquafx-project/aquafx

childNode19, childNode20, childNode21);
final TreeView treeView = new TreeView(root);
treeView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
treeView.setShowRoot(true);

代码示例来源:origin: io.github.factoryfx/javafxDataEditing

private Node createTree(){
  TreeView<TreeData> tree = new TreeView<>();
  tree.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
  tree.setCellFactory(param -> new DataTextFieldTreeCell<>(TreeData::getData, TreeData::getDisplayText));

相关文章