public ChangesListView(final Project project) { myProject = project; getModel().setRoot(ChangesBrowserNode.create(myProject, TreeModelBuilder.ROOT_NODE_VALUE)); setShowsRootHandles(true); setRootVisible(false); setDragEnabled(true); new TreeSpeedSearch(this, new NodeToTextConvertor()); SmartExpander.installOn(this); myCopyProvider = new ChangesBrowserNodeCopyProvider(this); new TreeLinkMouseListener(new ChangesBrowserNodeRenderer(myProject, false, false)).installOn(this); myNodeRenderer = new ChangesBrowserNodeRenderer(project, false, true); myShowFlattenNodeRenderer = new ChangesBrowserNodeRenderer(project, true, true); }
public ChangesListView(@Nonnull Project project) { myProject = project; setModel(TreeModelBuilder.buildEmpty(project)); setShowsRootHandles(true); setRootVisible(false); setDragEnabled(true); myCopyProvider = new ChangesBrowserNodeCopyProvider(this); ChangesBrowserNodeRenderer renderer = new ChangesBrowserNodeRenderer(project, () -> myShowFlatten, true); setCellRenderer(renderer); new TreeSpeedSearch(this, TO_TEXT_CONVERTER); SmartExpander.installOn(this); new TreeLinkMouseListener(renderer).installOn(this); }
private void initTree(final MyTree tree) { tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); tree.setCellRenderer(new MyTreeCellRenderer(tree == myLeftTree)); tree.setRootVisible(false); tree.setShowsRootHandles(true); UIUtil.setLineStyleAngled(tree); TreeUtil.installActions(tree); SmartExpander.installOn(tree); EditSourceOnDoubleClickHandler.install(tree); new TreeSpeedSearch(tree); PopupHandler.installUnknownPopupHandler(tree, createTreePopupActions(), ActionManager.getInstance()); }
public ChangesListView(final Project project) { myProject = project; getModel().setRoot(ChangesBrowserNode.create(myProject, TreeModelBuilder.ROOT_NODE_VALUE)); setShowsRootHandles(true); setRootVisible(false); new TreeSpeedSearch(this, new NodeToTextConvertor()); SmartExpander.installOn(this); myCopyProvider = new TreeCopyProvider(this); new TreeLinkMouseListener(new ChangesBrowserNodeRenderer(myProject, false, false)).installOn(this); }
private void initTree(final Tree tree) { final MigrationRootsTreeCellRenderer rootsTreeCellRenderer = new MigrationRootsTreeCellRenderer(); tree.setCellRenderer(rootsTreeCellRenderer); tree.setRootVisible(false); tree.setShowsRootHandles(true); UIUtil.setLineStyleAngled(tree); TreeUtil.installActions(tree); TreeUtil.expandAll(tree); SmartExpander.installOn(tree); EditSourceOnDoubleClickHandler.install(tree); new TreeSpeedSearch(tree); PopupHandler.installUnknownPopupHandler(tree, createTreePopupActions(), ActionManager.getInstance()); }