Package javax.swing.tree

Examples of javax.swing.tree.DefaultTreeModel


    final TestTree tree = new TestTree(nodes());

    private static TreeModel nodes() {
      MutableTreeNode root = node("root",
          node("branch1", node("branch1.1", node("branch1.1.1"), node("branch1.1.2")), node("branch1.2")));
      return new DefaultTreeModel(root);
    }
View Full Code Here


    final JTree tree = new JTree();
    final MutableTreeNode nodeToSelect = node("node111");

    private MyWindow(boolean treeRootVisible) {
      super(Bug293_errorWhenSelectingPathIfJTreeRootIsInvisible_Test.class);
      tree.setModel(new DefaultTreeModel(root()));
      tree.setPreferredSize(new Dimension(200, 200));
      tree.setRootVisible(treeRootVisible);
      add(tree);
    }
View Full Code Here

    public DBInputProcessorTree processorTree;

    public DBInputTreePanel(DebuggerTab debuggerTab) {
        this.debuggerTab = debuggerTab;

        treePanel = new AWTreePanel(new DefaultTreeModel(null));
        treePanel.setRootVisible(true);
        treePanel.setDelegate(this);

        processorTree = new DBInputProcessorTree(treePanel, debuggerTab);
    }
View Full Code Here

        rootsTableView.getTable().setDelegate(this);
        rootsTableView.getTable().setAllowEmptySelection(false);
        rootsTableView.getTable().setRememberSelection(true);
        rootsTableView.autoresizeColumns();

        treePanel = new AWTreePanel(new DefaultTreeModel(null));
        treePanel.setRootVisible(true);
        treePanel.setDelegate(this);

        tablesSplitPane = new JSplitPane();
        tablesSplitPane.setBorder(null);
View Full Code Here

        this.debuggerTab = debuggerTab;

        model = new DBParseTreeModel(debuggerTab);
        model.addListener(this);
       
        treePanel = new AWTreePanel(new DefaultTreeModel(null));
        treePanel.setDelegate(this);

        mainPanel.add(treePanel, BorderLayout.CENTER);
    }
View Full Code Here

        treeScrollPane.setWheelScrollingEnabled(true);

        panel.add(treeScrollPane, BorderLayout.CENTER);

        root = new DefaultMutableTreeNode();
        model = new DefaultTreeModel(root);
        lastRule = null;

        tree.setModel(model);
    }
View Full Code Here

    String wkDir = GlobalValues.workingDir;
    DefaultMutableTreeNode cwdFilesDir = new DefaultMutableTreeNode("Current Working Directory");
    DefaultMutableTreeNode vcwdFilesDir = new DefaultMutableTreeNode(wkDir);
    root.add(cwdFilesDir); cwdFilesDir.add(vcwdFilesDir);

    model = new DefaultTreeModel(root);   // a simple tree data model that uses TreeNodes


    GVarsTree = new JTree(model)// JTree displays the set of hierarchical data of model
    GVarsTree.setFont(GlobalValues.guifont);
   
View Full Code Here

        positionPropertiesFactory.setCellPropertiesEditor(this);

        // Set up all of the stuff we need to the tree to display Cells
        treeRoot = new SortedTreeNode(BUNDLE.getString("World_Root"));
        cellNodes = new HashMap();
        DefaultTreeModel treeModel = new DefaultTreeModel(treeRoot);
        cellHierarchyTree.setModel(treeModel);
        cellHierarchyTree.setCellRenderer(new CellTreeRenderer());

        // Create a listener that will listen to the status of Cells. This
        // listener gets added when the dialog is made visible. We need to do
View Full Code Here

        // Clear out any existing Cells from the tree. We do this by creating a
        // new tree model
        treeRoot = new SortedTreeNode(cache.getEnvironmentCell(),
                                      BUNDLE.getString("World_Root"));
        DefaultTreeModel treeModel = new DefaultTreeModel(treeRoot);
        cellHierarchyTree.setModel(treeModel);
        cellNodes.clear();
        cellNodes.put(cache.getEnvironmentCell(), treeRoot);

        // Loop through all of the root cells and add into the world
View Full Code Here

            parentNode = treeRoot;
        }
        parentNode.add(ret);

        // Tell the model that a new node has been inserted
        DefaultTreeModel model = (DefaultTreeModel)cellHierarchyTree.getModel();
        int childIndex = parentNode.getIndex(ret);
        model.nodesWereInserted(parentNode, new int[] { childIndex });

        // Recursively iterate through all of the Cell's children and add to
        // the tree.
        List<Cell> children = cell.getChildren();
        for (Cell child : children) {
View Full Code Here

TOP

Related Classes of javax.swing.tree.DefaultTreeModel

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.