Package javax.swing.tree

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


    {
      if (nodes.get(i).size() == 0)
      {
        if (root.getIndex(parent) != -1)
        {
          model.removeNodeFromParent(parent);
          parent.removeAllChildren();
        }
      }
      else
      {
View Full Code Here


      if (nodes.get(i).size() == 0)
      {
        if (parent.getParent() != null)
        {
          parent.removeAllChildren();
          model.removeNodeFromParent(parent);
        }
      }
      else
      {
        expand = false;
View Full Code Here

    {
      if (node.getParent() != null)
      {
        if (node.getChildCount() == 0)
        {
          model.removeNodeFromParent(node);
          model.nodeStructureChanged(node);
        }
      }
    }
View Full Code Here

         {
            node = (DefaultMutableTreeNode)path.getPathComponent (length - 1);
            ContextNode binding = (ContextNode)node.getUserObject ();
            context.unbind (binding.getName ());
            DefaultTreeModel model = (DefaultTreeModel)getModel ();
            model.removeNodeFromParent (node);

            // select the parent node and display its content
            DefaultMutableTreeNode parent = (DefaultMutableTreeNode)path.getPathComponent (length - 2);
            setSelectionPath (new TreePath (parent.getPath ()));
            ((ContextNode)parent.getUserObject ()).display ();
View Full Code Here

               
                JarefiApp app = JarefiApp.getApplication();
                MutableTreeNode myNode = app.getUIHandlers().getClasspathTreeHandler().getMyNode();

                if (parent != null && parent.equals(myNode)) {
                    treeModel.removeNodeFromParent(currentNode);
                    URL url = (URL)currentNode.getUserObject();
                    app.getUIHandlers().getClasspathTreeHandler().getClasspathList().remove(url);
                    return;
                }
            }
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.