Package com.intellij.ui.treeStructure

Examples of com.intellij.ui.treeStructure.Tree


  public JComponent buildUI()
  {
    if (contentPane == null)
    {
      tree = new Tree();
      tree.setRootVisible(false);
      tree.setShowsRootHandles(true);
      tree.getSelectionModel().addTreeSelectionListener(new TreeSelectionListener()
      {
        public void valueChanged(final TreeSelectionEvent e)
View Full Code Here


  @Override
  protected void setUp() throws Exception {
    super.setUp();

    myUserModel = TestFactory.createUserListWithUsers(this);
    myTree = new Tree();
    myIDEFacade = new MockIDEFacade(getClass());
    myLocalMessageDispatcher = new LocalMessageDispatcherImpl(getBroadcaster(), myIDEFacade, myUserModel);
    disposeOnTearDown(myLocalMessageDispatcher);
    myUsersTreeModel = new UsersTreeModel(myTree, myUserModel, myLocalMessageDispatcher);
    disposeOnTearDown(myUsersTreeModel);
View Full Code Here

  @Override
  protected void setUp() throws Exception {
    super.setUp();

    myUserModel = TestFactory.createUserListWithUsers(this);
    myTree = new Tree();
    myLocalMessageDispatcher = new LocalMessageDispatcherImpl(getBroadcaster(), new MockIDEFacade(getClass()), myUserModel);
    disposeOnTearDown(myLocalMessageDispatcher);
    myUsersTreeModel = new UsersTreeModel(myTree, myUserModel, myLocalMessageDispatcher);
    disposeOnTearDown(myUsersTreeModel);
    myTree.setModel(myUsersTreeModel);
View Full Code Here

        jLabel1 = new JLabel();
        jLabelMessage = new JLabel();
        jLabelMessage.setOpaque(true);
        jScrollPane1 = new JBScrollPane();

        examplesTree = new Tree();

        jPanel1.setBackground(new Color(255, 255, 255));
        jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel1.setForeground(new Color(255, 255, 255));
View Full Code Here

    }


    private Tree createTree() {

        Tree tree = new Tree() {

            private final JLabel myLabel = new JLabel(
                    String.format("<html><center>No Mongo server available<br><br>You may use <img src=\"%s\"> to add configuration</center></html>", pluginSettingsUrl)
            );

            @Override
            protected void paintComponent(Graphics g) {
                super.paintComponent(g);
                if (!getServerConfigurations().isEmpty()) return;

                myLabel.setFont(getFont());
                myLabel.setBackground(getBackground());
                myLabel.setForeground(getForeground());
                Rectangle bounds = getBounds();
                Dimension size = myLabel.getPreferredSize();
                myLabel.setBounds(0, 0, size.width, size.height);

                int x = (bounds.width - size.width) / 2;
                Graphics g2 = g.create(bounds.x + x, bounds.y + 20, bounds.width, bounds.height);
                try {
                    myLabel.paint(g2);
                } finally {
                    g2.dispose();
                }
            }
        };

        tree.getEmptyText().clear();
        tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);

        return tree;
    }
View Full Code Here

        configurationOverrideCombo.setPreferredSize(new Dimension(250, preferredHeight));
        configurationOverrideCombo.setMaximumSize(new Dimension(350, preferredHeight));

        treeModel = new ResultTreeModel();

        resultsTree = new Tree(treeModel);
        resultsTree.setRootVisible(false);

        final TreeSelectionListener treeSelectionListener = new ToolWindowSelectionListener();
        resultsTree.addTreeSelectionListener(treeSelectionListener);
        final MouseListener treeMouseListener = new ToolWindowMouseListener();
View Full Code Here

TOP

Related Classes of com.intellij.ui.treeStructure.Tree

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.