當前位置: 首頁>>代碼示例>>Java>>正文


Java UIUtil.setLineStyleAngled方法代碼示例

本文整理匯總了Java中com.intellij.util.ui.UIUtil.setLineStyleAngled方法的典型用法代碼示例。如果您正苦於以下問題:Java UIUtil.setLineStyleAngled方法的具體用法?Java UIUtil.setLineStyleAngled怎麽用?Java UIUtil.setLineStyleAngled使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.intellij.util.ui.UIUtil的用法示例。


在下文中一共展示了UIUtil.setLineStyleAngled方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initTree

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
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());


}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:17,代碼來源:CyclicDependenciesPanel.java

示例2: initTree

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
private static void initTree(Tree tree, boolean isRightTree) {
  tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
  tree.setCellRenderer(new MyTreeCellRenderer());
  tree.setRootVisible(false);
  tree.setShowsRootHandles(true);
  UIUtil.setLineStyleAngled(tree);

  TreeUtil.installActions(tree);
  new TreeSpeedSearch(tree, new Convertor<TreePath, String>() {
    @Override
    public String convert(TreePath o) {
      return o.getLastPathComponent().toString();
    }
  }, true);
  PopupHandler.installUnknownPopupHandler(tree, createTreePopupActions(isRightTree, tree), ActionManager.getInstance());
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:17,代碼來源:ModulesDependenciesPanel.java

示例3: FileTemplateTabAsTree

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
protected FileTemplateTabAsTree(String title) {
  super(title);
  myRoot = initModel();
  MyTreeModel treeModel = new MyTreeModel(myRoot);
  myTree = new Tree(treeModel);
  myTree.setRootVisible(false);
  myTree.setShowsRootHandles(true);
  UIUtil.setLineStyleAngled(myTree);

  myTree.expandPath(TreeUtil.getPathFromRoot(myRoot));
  myTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
  myTree.setCellRenderer(new MyTreeCellRenderer());
  myTree.expandRow(0);

  myTree.addTreeSelectionListener(new TreeSelectionListener() {
    @Override
    public void valueChanged(TreeSelectionEvent e) {
      onTemplateSelected();
    }
  });
  new TreeSpeedSearch(myTree);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:23,代碼來源:FileTemplateTabAsTree.java

示例4: DebuggerTreeBase

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
public DebuggerTreeBase(TreeModel model, Project project) {
  super(model);
  myProject = project;

  myTipManager = new TipManager(this, new TipManager.TipFactory() {
    @Override
    public JComponent createToolTip(MouseEvent e) {
      return DebuggerTreeBase.this.createToolTip(e);
    }

    @Override
    public MouseEvent createTooltipEvent(MouseEvent candidateEvent) {
      return DebuggerTreeBase.this.createTooltipEvent(candidateEvent);
    }

    @Override
    public boolean isFocusOwner() {
      return DebuggerTreeBase.this.isFocusOwner();
    }
  });

  Disposer.register(this, myTipManager);

  UIUtil.setLineStyleAngled(this);
  setRootVisible(false);
  setShowsRootHandles(true);
  setCellRenderer(new DebuggerTreeRenderer());
  updateUI();
  TreeUtil.installActions(this);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:31,代碼來源:DebuggerTreeBase.java

示例5: initTree

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
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());
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:15,代碼來源:MigrationPanel.java

示例6: InspectionTree

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
public InspectionTree(@NotNull Project project, @NotNull GlobalInspectionContextImpl context) {
  super(new InspectionRootNode(project));
  myContext = context;

  setCellRenderer(new CellRenderer());
  setShowsRootHandles(true);
  UIUtil.setLineStyleAngled(this);
  addTreeWillExpandListener(new ExpandListener());

  myExpandedUserObjects = new HashSet<Object>();
  myExpandedUserObjects.add(project);

  TreeUtil.installActions(this);
  new TreeSpeedSearch(this, new Convertor<TreePath, String>() {
    @Override
    public String convert(TreePath o) {
      return InspectionsConfigTreeComparator.getDisplayTextToSort(o.getLastPathComponent().toString());
    }
  });

  addTreeSelectionListener(new TreeSelectionListener() {
    @Override
    public void valueChanged(TreeSelectionEvent e) {
      TreePath newSelection = e.getNewLeadSelectionPath();
      if (newSelection != null) {
        mySelectionPath = new SelectionPath(newSelection);
      }
    }
  });
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:31,代碼來源:InspectionTree.java

示例7: initTree

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
private static void initTree(JTree tree) {
  UIUtil.setLineStyleAngled(tree);
  tree.setRootVisible(false);
  tree.setShowsRootHandles(true);
  tree.updateUI();
  ToolTipManager.sharedInstance().registerComponent(tree);
  TreeUtil.installActions(tree);
  new TreeSpeedSearch(tree);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:10,代碼來源:PsiViewerDialog.java

示例8: createTableRenderer

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
public TreeTableCellRenderer createTableRenderer(TreeTableModel treeTableModel) {
  TreeTableCellRenderer tableRenderer = super.createTableRenderer(treeTableModel);
  UIUtil.setLineStyleAngled(tableRenderer);
  tableRenderer.setRootVisible(false);
  tableRenderer.setShowsRootHandles(true);

  return tableRenderer;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:10,代碼來源:AbstractFileTreeTable.java

示例9: initTree

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
private void initTree(final MyTree tree, boolean isRightTree) {
  tree.setCellRenderer(new MyTreeCellRenderer());
  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(isRightTree), ActionManager.getInstance());


}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:16,代碼來源:DependenciesPanel.java

示例10: configureTree

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
protected void configureTree(@NotNull Tree tree) {
  tree.getSelectionModel().setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
  tree.setToggleClickCount(-1);
  tree.setCellRenderer(new HierarchyNodeRenderer());
  UIUtil.setLineStyleAngled(tree);
  new TreeSpeedSearch(tree);
  TreeUtil.installActions(tree);
  myAutoScrollToSourceHandler.install(tree);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:10,代碼來源:HierarchyBrowserBase.java

示例11: createTree

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
protected Tree createTree() {
  final Tree tree = new Tree(new DefaultTreeModel(new DefaultMutableTreeNode()));

  tree.setCellRenderer(getTreeCellRenderer());
  UIUtil.setLineStyleAngled(tree);
  tree.setRootVisible(false);
  tree.setShowsRootHandles(true);
  tree.addKeyListener(new TreeKeyListener());
  tree.addTreeSelectionListener(new MyTreeSelectionListener());

  if (!myAllowMultiSelection) {
    tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
  }

  new DoubleClickListener() {
    @Override
    protected boolean onDoubleClick(MouseEvent e) {
      if (tree.getPathForLocation(e.getX(), e.getY()) != null) {
        doOKAction();
        return true;
      }
      return false;
    }
  }.installOn(tree);

  TreeUtil.installActions(tree);
  return tree;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:29,代碼來源:MemberChooser.java

示例12: initTree

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
private void initTree() {
  myTree.setCellRenderer(new MyTreeCellRenderer());
  myTree.setRootVisible(false);
  myTree.setShowsRootHandles(true);
  UIUtil.setLineStyleAngled(myTree);
  TreeUtil.installActions(myTree);
  EditSourceOnDoubleClickHandler.install(myTree);
  new TreeSpeedSearch(myTree);
  myCopyPasteDelegator = new CopyPasteDelegator(myProject, this) {
    @Override
    @NotNull
    protected PsiElement[] getSelectedElements() {
      return getSelectedPsiElements();
    }
  };
  myTreeExpansionMonitor = PackageTreeExpansionMonitor.install(myTree, myProject);
  final ScopeTreeStructureExpander[] extensions = Extensions.getExtensions(ScopeTreeStructureExpander.EP_NAME, myProject);
  for (ScopeTreeStructureExpander expander : extensions) {
    myTree.addTreeWillExpandListener(expander);
  }
  if (extensions.length == 0) {
    myTree.addTreeWillExpandListener(new SortingExpandListener());
  }
  myTree.addKeyListener(new KeyAdapter() {
    @Override
    public void keyPressed(KeyEvent e) {
      if (KeyEvent.VK_ENTER == e.getKeyCode()) {
        final Object component = myTree.getLastSelectedPathComponent();
        if (component instanceof DefaultMutableTreeNode) {
          final DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)component;
          if (selectedNode.isLeaf()) {
            OpenSourceUtil.openSourcesFrom(DataManager.getInstance().getDataContext(myTree), false);
          }
        }
      }
    }
  });
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:39,代碼來源:ScopeTreeViewPanel.java

示例13: NewErrorTreeViewPanel

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
public NewErrorTreeViewPanel(Project project, String helpId, boolean createExitAction, boolean createToolbar, @Nullable Runnable rerunAction) {
  myProject = project;
  myHelpId = helpId;
  myCreateExitAction = createExitAction;
  myConfiguration = ErrorTreeViewConfiguration.getInstance(project);
  setLayout(new BorderLayout());

  myAutoScrollToSourceHandler = new AutoScrollToSourceHandler() {
    @Override
    protected boolean isAutoScrollMode() {
      return myConfiguration.isAutoscrollToSource();
    }

    @Override
    protected void setAutoScrollMode(boolean state) {
      myConfiguration.setAutoscrollToSource(state);
    }
  };

  myMessagePanel = new JPanel(new BorderLayout());

  myErrorViewStructure = new ErrorViewStructure(project, canHideWarnings());
  DefaultMutableTreeNode root = new DefaultMutableTreeNode();
  root.setUserObject(myErrorViewStructure.createDescriptor(myErrorViewStructure.getRootElement(), null));
  final DefaultTreeModel treeModel = new DefaultTreeModel(root);
  myTree = new Tree(treeModel) {
    @Override
    public void setRowHeight(int i) {
      super.setRowHeight(0);
      // this is needed in order to make UI calculate the height for each particular row
    }
  };
  myBuilder = new ErrorViewTreeBuilder(myTree, treeModel, myErrorViewStructure);

  myExporterToTextFile = new ErrorViewTextExporter(myErrorViewStructure);
  myOccurrenceNavigatorSupport = new MyOccurrenceNavigatorSupport(myTree);

  myAutoScrollToSourceHandler.install(myTree);
  TreeUtil.installActions(myTree);
  UIUtil.setLineStyleAngled(myTree);
  myTree.setRootVisible(false);
  myTree.setShowsRootHandles(true);
  myTree.setLargeModel(true);

  JScrollPane scrollPane = NewErrorTreeRenderer.install(myTree);
  scrollPane.setBorder(IdeBorderFactory.createBorder(SideBorder.LEFT));
  myMessagePanel.add(scrollPane, BorderLayout.CENTER);

  if (createToolbar) {
    add(createToolbarPanel(rerunAction), BorderLayout.WEST);
  }

  add(myMessagePanel, BorderLayout.CENTER);

  myTree.addKeyListener(new KeyAdapter() {
    @Override
    public void keyPressed(KeyEvent e) {
      if (e.getKeyCode() == KeyEvent.VK_ENTER) {
        navigateToSource(false);
      }
    }
  });

  myTree.addMouseListener(new PopupHandler() {
    @Override
    public void invokePopup(Component comp, int x, int y) {
      popupInvoked(comp, x, y);
    }
  });

  EditSourceOnDoubleClickHandler.install(myTree);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:73,代碼來源:NewErrorTreeViewPanel.java


注:本文中的com.intellij.util.ui.UIUtil.setLineStyleAngled方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。