Package javax.swing.tree

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


                    // 2) the number of children being added equals the number of children
                    //    of the root.
                                       
                    if ((treeModelEvent.getPath().length == 1) &&
                        (rootNode.getChildCount() == treeModelEvent.getChildren().length)) {
                        treeModel.nodeStructureChanged(rootNode);
                    }
                 
              
                }
View Full Code Here


        if (dataModel.getRoot() != null)
        {
            TreePath path = new TreePath(dataModel.getRoot());
            do
            {
                dataModel.nodeStructureChanged((TreeNode)path.getLastPathComponent());
                path = comp.getNextPath(path);
            }
            while(path != null);
        }
    }
View Full Code Here

            DefaultTreeModel model = (DefaultTreeModel)componentTree.getModel();
            // model.nodeChanged(node);
           
            // The following line was included because of task i78481.
            // In Java 1.6 nodeChanged does not work correctly.
            model.nodeStructureChanged(node);
           
            descriptionLabel.setText(nodeInfo.getDescription());
            sizeLabel.setText(sizeString + nodeInfo.getSize());
        }
    }
View Full Code Here

            DefaultTreeModel model = (DefaultTreeModel)componentTree.getModel();
            // model.nodeChanged(node);
           
            // The following line was included because of task i78481.
            // In Java 1.6 nodeChanged does not work correctly.
            model.nodeStructureChanged(node);
           
            descriptionLabel.setText(nodeInfo.getDescription());
            sizeLabel.setText(sizeString + nodeInfo.getSize());
        }
    }
View Full Code Here

                }
            }
            tree.expandPath(new TreePath(newChild.getPath()));
        }
       
        treeModel.nodeStructureChanged(rootNode);
       
       
        tree.addTreeWillExpandListener(new ResourceTreeWillExpandListener());
        tree.addTreeSelectionListener(new FileTreeSelectionListener());
       
View Full Code Here

            {
              newSelectionPath = new TreePath(node.getPath());
            }
          }
        }
        model.nodeStructureChanged(parent);
        if (expand)
        {
          tree.expandPath(new TreePath(parent.getPath()));
        }
        positionUnderRoot++;
View Full Code Here

            {
              newSelectionPath = new TreePath(node.getPath());
            }
          }
        }
        model.nodeStructureChanged(parent);
        if (expand || filterProvided)
        {
          toExpand.add(new TreePath(parent.getPath()));
        }
      }
View Full Code Here

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

    if (newSelectionPath != null)
View Full Code Here

    else if(changeTypeId.intValue() == NODE_CHILDREN_CHANGED)
    {
      node.setAreChildrenDefined(false);
     
      //model.nodeChanged(node);
      model.nodeStructureChanged(node)
      //model.reload(node);
 
      CMSNode addedNode = (CMSNode)nodes.get(addedNodeId);
      TreePath currentPath = nodeTree.getSelectionPath();
      if(currentPath == null)
View Full Code Here

    {
      CMSNode currentParent = (CMSNode)((CMSNode)nodeTree.getLastSelectedPathComponent()).getParent();     
      //System.out.println("node:" + node.getName());
      //System.out.println("currentParent:" + currentParent.getName());
      currentParent.setAreChildrenDefined(false);
      model.nodeStructureChanged(currentParent)
     
      node.setAreChildrenDefined(false);
      model.nodeStructureChanged(node)

      CMSNode addedNode = (CMSNode)nodes.get(addedNodeId);
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.