Package javax.swing.tree

Examples of javax.swing.tree.DefaultTreeModel.insertNodeInto()


        feature.setDefaultMutableTreeNode(childNode);

        FeatureTreeNode parentFeature = feature.getFeatureTreeNodeParent();
        DefaultMutableTreeNode parentNode = parentFeature.getDefaultMutableTreeNode();
        int count = dataModel.getChildCount(parentNode);
        dataModel.insertNodeInto(childNode,parentNode,count);

        addFeatureChildrenToSwingTree(feature);
    }

    public FeatureTreeNode buildFeatureTreeModel()
View Full Code Here


    public DefaultMutableTreeNode addNode(Object userObject,DefaultMutableTreeNode parentNode)
    {
        DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(userObject);
        DefaultTreeModel dataModel = (DefaultTreeModel)treeComp.getTreeModel();
        int count = dataModel.getChildCount(parentNode);
        dataModel.insertNodeInto(childNode,parentNode,count);
        return childNode;
    }

    public void endExamplePanel()
    {
View Full Code Here

                                TreePath parentPath = refPath.getParentPath();
                                DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode)parentPath.getLastPathComponent();
                                int childIndex = dataModel.getIndexOfChild(parentNode,refNode);
                                if (currentTarget == insertAfterButton.getHTMLInputElement())
                                    childIndex = childIndex + 1;
                                dataModel.insertNodeInto(newNode,parentNode,childIndex);
                            }
                        }
                        else // insert child
                        {
                            // refNode is the parent node
View Full Code Here

                        }
                        else // insert child
                        {
                            // refNode is the parent node
                            int childIndex = dataModel.getChildCount(refNode);
                            dataModel.insertNodeInto(newNode,refNode,childIndex);
                        }
                    }
                    else
                    {
                        if ((row == 0) && (dataModel.getRoot() == null))
View Full Code Here

                                TreePath parentPath = refPath.getParentPath();
                                DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode)parentPath.getLastPathComponent();
                                int childIndex = dataModel.getIndexOfChild(parentNode,refNode);
                                if (currentTarget == insertAfterButton.getHTMLInputElement())
                                    childIndex = childIndex + 1;
                                dataModel.insertNodeInto(newNode,parentNode,childIndex);
                            }
                        }
                        else // insert child
                        {
                            // refNode is the parent node
View Full Code Here

                        }
                        else // insert child
                        {
                            // refNode is the parent node
                            int childIndex = dataModel.getChildCount(refNode);
                            dataModel.insertNodeInto(newNode,refNode,childIndex);
                        }
                    }
                    else
                    {
                        if ((row == 0) && (dataModel.getRoot() == null))
View Full Code Here

    public DefaultMutableTreeNode addNode(String value,DefaultMutableTreeNode parentNode)
    {
        DefaultTreeModel dataModel = (DefaultTreeModel)comp.getTreeModel();
        DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(value);
        int count = dataModel.getChildCount(parentNode);
        dataModel.insertNodeInto(childNode,parentNode,count);
        return childNode;
    }

    public void handleEvent(Event evt)
    {
View Full Code Here

                                TreePath parentPath = refPath.getParentPath();
                                DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode)parentPath.getLastPathComponent();
                                int childIndex = dataModel.getIndexOfChild(parentNode,refNode);
                                if (currentTarget == insertAfterButton.getHTMLInputElement())
                                    childIndex = childIndex + 1;
                                dataModel.insertNodeInto(newNode,parentNode,childIndex);
                            }
                        }
                        else // insert child
                        {
                            // refNode is the parent node
View Full Code Here

                        }
                        else // insert child
                        {
                            // refNode is the parent node
                            int childIndex = dataModel.getChildCount(refNode);
                            dataModel.insertNodeInto(newNode,refNode,childIndex);
                        }
                    }
                    else
                    {
                        if ((row == 0) && (dataModel.getRoot() == null))
View Full Code Here

      public void onClick(AjaxRequestTarget target)
      {
        treeTable.modelChanging();
        DefaultTreeModel model = (DefaultTreeModel)treeTable.getDefaultModelObject();
        model.removeNodeFromParent(c3);
        model.insertNodeInto(c3, c2, model.getChildCount(c2));
        treeTable.modelChanged();
        treeTable.nodeSelected(c2);
        treeTable.updateTree(target);
      }
    });
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.