Examples of TreeNode


Examples of javax.swing.tree.TreeNode

            row--;
        }
    }

    private void expandAll(TreePath parent) {
        TreeNode node = (TreeNode)parent.getLastPathComponent();
        boolean hasAuxiliaryDsNodes = node instanceof DataSourceNode && ((DataSource)((DataSourceNode) node).getUserObject()).isCompound();

        if ((node.getChildCount() >= 0) && !hasAuxiliaryDsNodes) {
            for (Enumeration e=node.children(); e.hasMoreElements(); ) {
                TreeNode n = (TreeNode)e.nextElement();
                TreePath path = parent.pathByAddingChild(n);
                expandAll(path);
            }
        }
View Full Code Here

Examples of javax.swing.tree.TreeNode

                    ExpressionDataSource ds = (ExpressionDataSource)o;
                    if (name.equals(DataInfo.getLabel(ds)) || name.equals(DataInfo.getAlias(ds))) {
                        ds.changeExpression(exp, node);
                        newSource = false;
                        ExpressionPanel.this.sourceTree.setSelectedValue(ds);
                        TreeNode tn = (TreeNode)(ExpressionPanel.this.sourceTree.getSelectionPath().getLastPathComponent());
                        ((DefaultTreeModel)(ExpressionPanel.this.sourceTree.getModel())).nodeChanged(tn);
                        break;
                    }
                }
                if (newSource) {
View Full Code Here

Examples of javax.swing.tree.TreeNode

                        ((DataSource) o).getInformation().alias = vc.var;
                        list.repaint();
                        if (clm.resolved()) {
                            bok.setEnabled(true);
                        }
                        TreeNode tn = (TreeNode) (st.getSelectionPath().getLastPathComponent());
                        ((DefaultTreeModel) (st.getModel())).nodeChanged(tn);
                    }
                });
                st.addTreeSelectionListener(new TreeSelectionListener() {
                    public void valueChanged(TreeSelectionEvent e) {
                        Object o = st.getSelectedSourceOrCollection();
                        if ((o instanceof DataSource) && e.isAddedPath()) {
                            VariableConflict vc = (VariableConflict) list.getSelectedValue();
                            vc.ds = (DataSource) o;
                            list.repaint();
                            if (clm.resolved()) {
                                bok.setEnabled(true);
                            }
                            TreeNode tn = (TreeNode) (st.getSelectionPath().getLastPathComponent());
                            ((DefaultTreeModel) (st.getModel())).nodeChanged(tn);
                        }
                    }
                });
                list.addListSelectionListener(new ListSelectionListener() {
View Full Code Here

Examples of javax.swing.tree.TreeNode

        super(tree, graphObject, getChildren);
    }
   
   
    BranchGroup getRootGroup(){
        TreeNode n=this;
        while(n!=null){
            if((n instanceof BranchGroupNode)&&(n.getParent() instanceof UniverseNode)){
                return (BranchGroup)((BranchGroupNode)n).getGraphObject();
            }
            n=n.getParent();
        }
        return null;
    }
View Full Code Here

Examples of javax.swing.tree.TreeNode

        }
        return null;
    }
   
    Universe getUniverse(){
        TreeNode n=getParent();
        while(n!=null){
            if(n instanceof UniverseNode){
                return (Universe)((AbstractNode)n).getGraphObject();
            }
            n=n.getParent();
        }
        return null;
    }
View Full Code Here

Examples of javax.swing.tree.TreeNode

        return (SceneGraphObject)getGraphObject();
    }

    @Override
    public SceneGraphObjectHolder getParentHolder(){
        TreeNode p=getParent();
        if(p instanceof SceneGraphObjectHolder){
            return (SceneGraphObjectHolder)p;
        }
        return null;
    }
View Full Code Here

Examples of javax.swing.tree.TreeNode

    }

    @Override
    public void getRootHolders(ArrayList<SceneGraphObjectHolder> list){
        UniverseNode un=null;
        TreeNode tn=this;
        while(un==null && tn!=null){
            tn=tn.getParent();
            if(tn instanceof UniverseNode){
                un=(UniverseNode)tn;
            }
        }
        if(un!=null){
View Full Code Here

Examples of javax.swing.tree.TreeNode

                //
                //make sure the node that fired this change still belongs
                //to our model (if the model was swapped in the middle of
                //a fetch operation, this can happen)
                //
                TreeNode parent = pNode;
                while (parent != null && parent.getParent() != null) parent = parent.getParent();
                if (parent == null || !parent.equals(model.getRoot()))
                    return;

                //
                //notify that the structure of the given node has been changed
                //
View Full Code Here

Examples of javax.swing.tree.TreeNode

     * @param pNode the node
     *
     * @return a {@link PomNode} up the given node's hierarchy, or {@code null}
     */
    public PomNode getPomNode(final TreeNode pNode) {
        TreeNode parent = pNode;
        while (parent != null && !(parent instanceof PomNode)) parent = parent.getParent();

        return (PomNode) parent;
    }
View Full Code Here

Examples of javax.swing.tree.TreeNode

        final PomNode pomNode = findPomNode(pEvent.getPomUrl());

        //noinspection unchecked
        final Enumeration<TreeNode> children = pomNode.children();
        while (children.hasMoreElements()) {
            final TreeNode node = children.nextElement();
            if (node instanceof PluginGoalNode) {
                final PluginGoalNode goalNode = (PluginGoalNode) node;
                if (goalNode.getGoal().equals(goal)) {

                    final int index = pomNode.getIndex(goalNode);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.