use of com.intellij.ui.TreeUIHelper in project intellij-community by JetBrains.
the class IntersectingLocalChangesPanel method createTree.
@NotNull
private SimpleTree createTree() {
SimpleTree tree = new SimpleTree(TreeModelBuilder.buildFromFilePaths(myProject, true, myFiles)) {
@Override
protected void configureUiHelper(@NotNull TreeUIHelper helper) {
super.configureUiHelper(helper);
helper.installEditSourceOnDoubleClick(this);
helper.installEditSourceOnEnterKeyHandler(this);
}
};
tree.setRootVisible(false);
tree.setShowsRootHandles(false);
tree.setCellRenderer(new ChangesBrowserNodeRenderer(myProject, BooleanGetter.TRUE, false));
return tree;
}
use of com.intellij.ui.TreeUIHelper in project intellij-community by JetBrains.
the class CvsTree method init.
public void init() {
final TreeNode root = createRoot(myProject);
myModel = new DefaultTreeModel(root, true);
myTree = new Tree(myModel);
add(ScrollPaneFactory.createScrollPane(myTree), BorderLayout.CENTER);
myTree.getSelectionModel().setSelectionMode(mySelectionMode);
myTree.setCellRenderer(new Cvs2Renderer());
addSelectionListener();
final TreeUIHelper uiHelper = TreeUIHelper.getInstance();
uiHelper.installTreeSpeedSearch(myTree);
TreeUtil.installActions(myTree);
IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> {
IdeFocusManager.getGlobalInstance().requestFocus(myTree, true);
});
}
Aggregations