Package javax.swing.tree

Examples of javax.swing.tree.DefaultTreeSelectionModel


      m_componentTree.setEnabled(true);
      m_componentTree.setToolTipText("");
      m_componentTree.setRootVisible(false);
      m_componentTree.setShowsRootHandles(true);
      m_componentTree.setCellRenderer(new BeanIconRenderer());
      DefaultTreeSelectionModel selectionModel = new DefaultTreeSelectionModel();
      selectionModel.setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
      m_componentTree.setSelectionModel(selectionModel);

      m_componentTree.addMouseListener(new MouseAdapter() {
        public void mouseClicked(MouseEvent e) {
View Full Code Here


   */
  private JComponent createEntryTree(final boolean includeGlobals)
  {
    treeModel = new ConfigTreeModel(packageManager, includeGlobals);

    final TreeSelectionModel selectionModel = new DefaultTreeSelectionModel();
    selectionModel.setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);

    tree = new JTree(treeModel);
    tree.setSelectionModel(selectionModel);
    tree.setCellRenderer(new ConfigTreeRenderer());
    tree.setRootVisible(false);
View Full Code Here

      m_componentTree.setEnabled(true);
      m_componentTree.setToolTipText("");
      m_componentTree.setRootVisible(false);
      m_componentTree.setShowsRootHandles(true);
      m_componentTree.setCellRenderer(new BeanIconRenderer());
      DefaultTreeSelectionModel selectionModel = new DefaultTreeSelectionModel();
      selectionModel.setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
      m_componentTree.setSelectionModel(selectionModel);

      m_componentTree.addMouseListener(new MouseAdapter() {
        public void mouseClicked(MouseEvent e) {
View Full Code Here

    robot.waitForIdle();
  }

  @RunsInEDT
  private static void setDefaultSelectionModelTo(final JTree tree) {
    final DefaultTreeSelectionModel selectionModel = new DefaultTreeSelectionModel();
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        tree.setSelectionModel(selectionModel);
      }
View Full Code Here

                        .contains("showing=false");
  }

  @RunsInEDT
  private void setContiguousSelectionMode() {
    TreeSelectionModel selectionModel = new DefaultTreeSelectionModel();
    selectionModel.setSelectionMode(CONTIGUOUS_TREE_SELECTION);
    setSelectionModel(tree, selectionModel);
  }
View Full Code Here

            if (bIsUserDefined){
                oUserDefinedObject = _oUserDefinedObject;
                m_oInspectorPane.setTitle(_sTitle);
            }
            javax.swing.JScrollPane jScrollPane1 = new javax.swing.JScrollPane();
            TreeSelectionModel tsm = new DefaultTreeSelectionModel();
            tsm.setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);           
            jTree.setSelectionModel(tsm);
            jTree.setVisible(false);
            jPnlCenter.setLayout(new java.awt.BorderLayout(10, 10));
            jPnlCenter.getAccessibleContext().setAccessibleName("inspection tab view");
            insertTopPanel(jPnlCenter);
View Full Code Here

  protected void init()
  {
    setTitle(EditorExpressionsMessages.getString("ExpressionChooserDialog.Title"));
    setModal(true);

    final DefaultTreeSelectionModel selectionModel = new DefaultTreeSelectionModel();
    selectionModel.setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
    selectionModel.addTreeSelectionListener(new ExpressionSelectionHandler());

    expressionsTree = new JTree(ExpressionsTreeModel.getTreeModel());
    expressionsTree.setRootVisible(false);
    expressionsTree.setSelectionModel(selectionModel);
    expressionsTree.addMouseListener(new DblClickHandler());
View Full Code Here

   */
  private JComponent createEntryTree(final boolean includeGlobals)
  {
    treeModel = new ConfigTreeModel(packageManager, includeGlobals);

    final TreeSelectionModel selectionModel = new DefaultTreeSelectionModel();
    selectionModel.setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);

    tree = new JTree(treeModel);
    tree.setSelectionModel(selectionModel);
    tree.setCellRenderer(new ConfigTreeRenderer());
    tree.setRootVisible(false);
View Full Code Here

  }

  private void createUIComponents()
  {
    issueTree = new IssueTree(project, review, new PriorityIssueTreeGrouper());
    issueTree.setSelectionModel(new DefaultTreeSelectionModel()
    {
      @Override
      public void setSelectionPaths(TreePath[] pPaths)
      {
        if (saveIfModified())
View Full Code Here

    // Set up the type tree. Use simple DefaultTreeModel.
    DefaultMutableTreeNode root = new DefaultMutableTreeNode("<html><b>No CAS!</b></html>");
    DefaultTreeModel treeModel = new DefaultTreeModel(root);
    this.typeTree = new JTree(treeModel);
    this.typeTree.addTreeSelectionListener(new TypeTreeSelectionListener());
    TreeSelectionModel treeSelectionModel = new DefaultTreeSelectionModel();
    treeSelectionModel.setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
    this.typeTree.setSelectionModel(treeSelectionModel);
    JScrollPane treePane = new JScrollPane(this.typeTree);
    contentPane.setLeftComponent(treePane);
    DefaultTreeCellRenderer cellRenderer = new DefaultTreeCellRenderer();
    cellRenderer.setLeafIcon(null);
View Full Code Here

TOP

Related Classes of javax.swing.tree.DefaultTreeSelectionModel

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.