/[classpath]/classpath/javax/swing/plaf/basic/BasicTreeUI.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/basic/BasicTreeUI.java

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

revision 1.60 by langel, Fri Aug 12 17:56:48 2005 UTC revision 1.61 by langel, Mon Aug 15 18:30:58 2005 UTC
# Line 1733  public class BasicTreeUI Line 1733  public class BasicTreeUI
1733                    if (e.isControlDown())                    if (e.isControlDown())
1734                      tree.setLeadSelectionPath(newPath);                      tree.setLeadSelectionPath(newPath);
1735                    else if (!mod.isLeaf(next) && e.isShiftDown())                    else if (!mod.isLeaf(next) && e.isShiftDown())
1736                      {                      BasicTreeUI.this.tree.expandPath(newPath);
                       BasicTreeUI.this.tree.expandPath(newPath);  
                       try  
                         {  
                           BasicTreeUI.this.tree.fireTreeWillExpand(newPath);  
                         }  
                       catch (ExpandVetoException ev)  
                         {  
                         }  
                       BasicTreeUI.this.tree.fireTreeExpanded(newPath);  
                     }  
1737                  }                  }
1738              }              }
1739            // UP, KP_UP            // UP, KP_UP
# Line 1761  public class BasicTreeUI Line 1751  public class BasicTreeUI
1751                    if (e.isControlDown())                    if (e.isControlDown())
1752                      tree.setLeadSelectionPath(newPath);                      tree.setLeadSelectionPath(newPath);
1753                    else if (!mod.isLeaf(prev) && e.isShiftDown())                    else if (!mod.isLeaf(prev) && e.isShiftDown())
1754                      {                      BasicTreeUI.this.tree.expandPath(newPath);
                       BasicTreeUI.this.tree.expandPath(newPath);  
                       try  
                         {  
                           BasicTreeUI.this.tree.fireTreeWillExpand(newPath);  
                         }  
                       catch (ExpandVetoException ev)  
                         {  
                         }  
                       BasicTreeUI.this.tree.fireTreeExpanded(newPath);  
                     }  
1755                  }                  }
1756              }              }
1757            // LEFT, KP_LEFT            // LEFT, KP_LEFT
# Line 1782  public class BasicTreeUI Line 1762  public class BasicTreeUI
1762                Object p = getParent(mod.getRoot(), last);                Object p = getParent(mod.getRoot(), last);
1763    
1764                if (!mod.isLeaf(last) && BasicTreeUI.this.tree.isExpanded(path))                if (!mod.isLeaf(last) && BasicTreeUI.this.tree.isExpanded(path))
1765                  {                  BasicTreeUI.this.tree.collapsePath(path);
                   BasicTreeUI.this.tree.collapsePath(path);  
                   try  
                     {  
                       BasicTreeUI.this.tree.fireTreeWillCollapse(path);  
                     }  
                   catch (ExpandVetoException ev)  
                     {  
                     }  
                   BasicTreeUI.this.tree.fireTreeCollapsed(path);  
                 }  
1766                else if (p != null)                else if (p != null)
1767                  BasicTreeUI.this.selectPath(BasicTreeUI.this.tree,                  BasicTreeUI.this.selectPath(BasicTreeUI.this.tree,
1768                                              new TreePath(getPathToRoot(p, 0)));                                              new TreePath(getPathToRoot(p, 0)));
# Line 1804  public class BasicTreeUI Line 1774  public class BasicTreeUI
1774                TreePath path = new TreePath(getPathToRoot(last, 0));                TreePath path = new TreePath(getPathToRoot(last, 0));
1775    
1776                if (!mod.isLeaf(last) && BasicTreeUI.this.tree.isCollapsed(path))                if (!mod.isLeaf(last) && BasicTreeUI.this.tree.isCollapsed(path))
1777                  {                  BasicTreeUI.this.tree.expandPath(path);
                   BasicTreeUI.this.tree.expandPath(path);  
                   try  
                     {  
                       BasicTreeUI.this.tree.fireTreeWillExpand(path);  
                     }  
                   catch (ExpandVetoException ev)  
                     {  
                     }  
                   BasicTreeUI.this.tree.fireTreeExpanded(path);  
                 }  
1778                else                else
1779                  {                  {
1780                    Object next = BasicTreeUI.this.getNextVisibleNode(last);                    Object next = BasicTreeUI.this.getNextVisibleNode(last);
# Line 1835  public class BasicTreeUI Line 1795  public class BasicTreeUI
1795                if (!mod.isLeaf(last))                if (!mod.isLeaf(last))
1796                  {                  {
1797                    if (BasicTreeUI.this.tree.isExpanded(path))                    if (BasicTreeUI.this.tree.isExpanded(path))
1798                      {                      BasicTreeUI.this.tree.collapsePath(path);
                       BasicTreeUI.this.tree.collapsePath(path);  
                       try  
                         {  
                           BasicTreeUI.this.tree.fireTreeWillCollapse(path);  
                         }  
                       catch (ExpandVetoException ev)  
                         {  
                         }  
                       BasicTreeUI.this.tree.fireTreeCollapsed(path);  
                     }  
1799                    else                    else
1800                      {                      BasicTreeUI.this.tree.expandPath(path);
                       BasicTreeUI.this.tree.expandPath(path);  
                       try  
                         {  
                           BasicTreeUI.this.tree.fireTreeWillExpand(path);  
                         }  
                       catch (ExpandVetoException ev)  
                         {  
                         }  
                       BasicTreeUI.this.tree.fireTreeExpanded(path);  
                     }  
1801                  }                  }
1802              }              }
1803          }          }
# Line 2013  public class BasicTreeUI Line 1953  public class BasicTreeUI
1953                    lastClicked = null;                    lastClicked = null;
1954                    BasicTreeUI.this.tree.getSelectionModel().clearSelection();                    BasicTreeUI.this.tree.getSelectionModel().clearSelection();
1955                    if (BasicTreeUI.this.tree.isExpanded(path))                    if (BasicTreeUI.this.tree.isExpanded(path))
1956                      {                      BasicTreeUI.this.tree.collapsePath(path);
                       BasicTreeUI.this.tree.collapsePath(path);  
                       try  
                         {  
                           BasicTreeUI.this.tree.fireTreeWillCollapse(path);  
                         }  
                       catch (ExpandVetoException ev)  
                         {  
                         }  
                       BasicTreeUI.this.tree.fireTreeCollapsed(path);  
                     }  
1957                    else                    else
1958                      {                      BasicTreeUI.this.tree.expandPath(path);
                       BasicTreeUI.this.tree.expandPath(path);  
                       try  
                         {  
                           BasicTreeUI.this.tree.fireTreeWillExpand(path);  
                         }  
                       catch (ExpandVetoException ev)  
                         {  
                         }  
                       BasicTreeUI.this.tree.fireTreeExpanded(path);  
                     }  
1959                  }                  }
1960    
1961                BasicTreeUI.this.selectPath(BasicTreeUI.this.tree, path);                BasicTreeUI.this.selectPath(BasicTreeUI.this.tree, path);
# Line 2620  public class BasicTreeUI Line 2540  public class BasicTreeUI
2540        }        }
2541    
2542      if (!mod.isLeaf(startNode)      if (!mod.isLeaf(startNode)
2543          && tree.isExpanded(new TreePath(getPathToRoot(startNode, 0)))          && tree.isExpanded(new TreePath(getPathToRoot(startNode, 0)))
2544          && mod.getChildCount(startNode) > 0)          && mod.getChildCount(startNode) > 0)
2545        {        {
2546          Object child = mod.getChild(startNode, 0);          Object child = mod.getChild(startNode, 0);

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.61

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