/[classpath]/classpath/javax/swing/JTree.java
ViewVC logotype

Diff of /classpath/javax/swing/JTree.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.32 by langel, Mon Aug 8 14:05:35 2005 UTC revision 1.33 by langel, Wed Aug 10 17:46:17 2005 UTC
# Line 1297  public class JTree Line 1297  public class JTree
1297                  // Don't expand if last path component is a leaf node.                  // Don't expand if last path component is a leaf node.
1298                  if ((path == null) || (treeModel.isLeaf(path.getLastPathComponent())))                  if ((path == null) || (treeModel.isLeaf(path.getLastPathComponent())))
1299                          return;                          return;
1300                    
1301                  setExpandedState(path, true);                  setExpandedState(path, true);
1302          }          }
1303    
# Line 1503  public class JTree Line 1503  public class JTree
1503                  return null;                  return null;
1504          }          }
1505    
         private void checkExpandParents(TreePath path) throws ExpandVetoException  
         {  
   
                 TreePath parent = path.getParentPath();  
   
                 if (parent != null)  
                         checkExpandParents(parent);  
   
                 fireTreeWillExpand(path);  
         }  
   
1506          private void doExpandParents(TreePath path, boolean state)          private void doExpandParents(TreePath path, boolean state)
1507          {          {
1508                  TreePath parent = path.getParentPath();                  TreePath parent = path.getParentPath();        
                   
1509                  if (isExpanded(parent))                  if (isExpanded(parent))
1510                  {                  {
1511                          nodeStates.put(path, state ? EXPANDED : COLLAPSED);                          nodeStates.put(path, state ? EXPANDED : COLLAPSED);
# Line 1537  public class JTree Line 1525  public class JTree
1525    
1526                  TreePath parent = path.getParentPath();                  TreePath parent = path.getParentPath();
1527    
                 try  
                 {  
                         if (parent != null)  
                                 checkExpandParents(parent);  
                 }  
                 catch (ExpandVetoException e)  
                 {  
                         // Expansion vetoed.  
                         return;  
                 }  
   
1528                  doExpandParents(path, state);                  doExpandParents(path, state);
1529          }          }
1530    

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26