当前位置: 首页>>代码示例>>Java>>正文


Java SimpleTreeStructure类代码示例

本文整理汇总了Java中com.intellij.ui.treeStructure.SimpleTreeStructure的典型用法代码示例。如果您正苦于以下问题:Java SimpleTreeStructure类的具体用法?Java SimpleTreeStructure怎么用?Java SimpleTreeStructure使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SimpleTreeStructure类属于com.intellij.ui.treeStructure包,在下文中一共展示了SimpleTreeStructure类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setTestRun

import com.intellij.ui.treeStructure.SimpleTreeStructure; //导入依赖的package包/类
/**
 * Populates table with appropriate metrics
 *
 * @param testRun - testRun to display inside the table
 */
public void setTestRun(TestRun testRun) {
    //setup presentation
    TestRunNode node = new TestRunNode(testRun);
    this.model.setRoot(new DefaultMutableTreeNode(node));
    final SimpleTreeStructure treeStructure = new SimpleTreeStructure.Impl(node);
    this.treeBuilder = new SimpleTreeBuilder(this.tree.getTree(), this.model, treeStructure, null);
    Disposer.register(this, this.treeBuilder);

    this.treeBuilder.expand(treeStructure.getRootElement(), () -> this.expandFailing(treeStructure, treeStructure.getRootElement()));

    this.treeBuilder.initRoot();
}
 
开发者ID:Dynatrace,项目名称:Dynatrace-AppMon-IntelliJ-IDEA-Integration-Plugin,代码行数:18,代码来源:TestRunResultsView.java

示例2: expandFailing

import com.intellij.ui.treeStructure.SimpleTreeStructure; //导入依赖的package包/类
private void expandFailing(SimpleTreeStructure treeStructure, Object rootElement) {
    for (Object obj : treeStructure.getChildElements(rootElement)) {
        if (obj instanceof StatusProvider) {
            if (((StatusProvider) obj).getStatus() != TestStatus.PASSED) {
                this.treeBuilder.expand(obj, null);
                this.treeBuilder.queueUpdateFrom(obj, true, true);
            }
            this.expandFailing(treeStructure, obj);
        }
    }
}
 
开发者ID:Dynatrace,项目名称:Dynatrace-AppMon-IntelliJ-IDEA-Integration-Plugin,代码行数:12,代码来源:TestRunResultsView.java

示例3: setupWorkItemQueries

import com.intellij.ui.treeStructure.SimpleTreeStructure; //导入依赖的package包/类
private void setupWorkItemQueries() {
  myTreeBuilder = new WorkItemQueriesTreeBuilder(myWorkItemQueriesTree, new SimpleTreeStructure.Impl(new NullNode()));
  Disposer.register(this, myTreeBuilder);
}
 
开发者ID:Microsoft,项目名称:vso-intellij,代码行数:5,代码来源:WorkItemsPanel.java

示例4: WorkItemQueriesTreeBuilder

import com.intellij.ui.treeStructure.SimpleTreeStructure; //导入依赖的package包/类
public WorkItemQueriesTreeBuilder(@NotNull JTree tree, @NotNull SimpleTreeStructure treeStructure) {
  super(tree, new DefaultTreeModel(new DefaultMutableTreeNode(treeStructure.getRootElement())), treeStructure, null);
}
 
开发者ID:Microsoft,项目名称:vso-intellij,代码行数:4,代码来源:WorkItemQueriesTreeBuilder.java

示例5: CruciblePanel

import com.intellij.ui.treeStructure.SimpleTreeStructure; //导入依赖的package包/类
public CruciblePanel(@NotNull final Project project) {
  super(false);
  myProject = project;

  final JBSplitter splitter = new JBSplitter(false, 0.2f);

  myReviewModel = new CrucibleReviewModel(project);
  myReviewTable = new JBTable(myReviewModel);
  myReviewTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  myReviewTable.setStriped(true);
  myReviewTable.setExpandableItemsEnabled(false);

  final TableColumnModel columnModel = myReviewTable.getColumnModel();
  columnModel.getColumn(1).setCellRenderer(new DescriptionCellRenderer());

  setUpColumnWidths(myReviewTable);
  myReviewTable.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent e) {
      if (e.getClickCount() == 2) {
        final int viewRow = myReviewTable.getSelectedRow();
        if (viewRow >= 0 &&  viewRow < myReviewTable.getRowCount()) {
          ApplicationManager.getApplication().invokeLater(new Runnable() {
            @Override
            public void run() {
              final Review review =
                CrucibleManager.getInstance(myProject).getDetailsForReview((String)myReviewTable.
                  getValueAt(viewRow, myReviewTable.getColumnModel().getColumnIndex(CrucibleBundle.message("crucible.id"))));
              if (review != null) {
                openDetailsToolWindow(review);
                myReviewTable.clearSelection();
              }
            }
          }, ModalityState.stateForComponent(myReviewTable));

        }
      }
  }});

  final TableRowSorter<TableModel> rowSorter = new TableRowSorter<TableModel>(myReviewModel);
  rowSorter.setSortKeys(Collections.singletonList(new RowSorter.SortKey(4, SortOrder.ASCENDING)));
  rowSorter.sort();
  myReviewTable.setRowSorter(rowSorter);

  final JScrollPane detailsScrollPane = ScrollPaneFactory.createScrollPane(myReviewTable);

  final SimpleTreeStructure reviewTreeStructure = createTreeStructure();
  final DefaultTreeModel model = new CrucibleTreeModel();
  final SimpleTree reviewTree = new SimpleTree(model);

  new AbstractTreeBuilder(reviewTree, model, reviewTreeStructure, null);
  reviewTree.invalidate();

  final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(reviewTree);
  splitter.setFirstComponent(scrollPane);
  splitter.setSecondComponent(detailsScrollPane);
  setContent(splitter);
}
 
开发者ID:ktisha,项目名称:Crucible4IDEA,代码行数:58,代码来源:CruciblePanel.java

示例6: createTreeStructure

import com.intellij.ui.treeStructure.SimpleTreeStructure; //导入依赖的package包/类
private SimpleTreeStructure createTreeStructure() {
  final CrucibleRootNode rootNode = new CrucibleRootNode(myReviewModel);
  return new CrucibleTreeStructure(rootNode);
}
 
开发者ID:ktisha,项目名称:Crucible4IDEA,代码行数:5,代码来源:CruciblePanel.java

示例7: JamAbstractTreeBuilder

import com.intellij.ui.treeStructure.SimpleTreeStructure; //导入依赖的package包/类
public JamAbstractTreeBuilder(final JTree tree, SimpleTreeStructure structure) {
  this(tree, new DefaultTreeModel(new DefaultMutableTreeNode()), structure);
}
 
开发者ID:consulo,项目名称:consulo-javaee,代码行数:4,代码来源:JamAbstractTreeBuilder.java


注:本文中的com.intellij.ui.treeStructure.SimpleTreeStructure类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。