Java 类com.intellij.ui.SmartExpander 实例源码

项目:intellij-ce-playground    文件:ChangesListView.java   
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);
}
项目:consulo    文件:ChangesListView.java   
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);
}
项目:consulo-java    文件:CyclicDependenciesPanel.java   
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());


}
项目:tools-idea    文件:ChangesListView.java   
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);
}
项目:consulo-java    文件:MigrationPanel.java   
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());
}