/[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.45 by langel, Wed Jul 20 18:59:13 2005 UTC revision 1.46 by langel, Thu Jul 21 14:37:26 2005 UTC
# Line 1322  public class BasicTreeUI Line 1322  public class BasicTreeUI
1322           while (node != null)           while (node != null)
1323           {           {
1324              count++;              count++;
1325              DefaultMutableTreeNode nextNode = node.getNextNode();              DefaultMutableTreeNode nextNode = getNextVisibleNode(node);
1326              if (nextNode != null)              if (nextNode != null)
1327                 maxWidth = Math.max(maxWidth, (int) (getCellBounds(0, 0, nextNode)                 maxWidth = Math.max(maxWidth, (int) (getCellBounds(0, 0, nextNode)
1328                       .getWidth()));                       .getWidth()));
# Line 1896  public class BasicTreeUI Line 1896  public class BasicTreeUI
1896                
1897        /** Number of mouse clicks on a non-leaf */        /** Number of mouse clicks on a non-leaf */
1898        private int clickCount = 0;        private int clickCount = 0;
1899          
1900          /** The last non-leaf cell that was clicked */
1901          private Object lastClicked = null;
1902    
1903        /**        /**
1904         * Constructor         * Constructor
# Line 1943  public class BasicTreeUI Line 1946  public class BasicTreeUI
1946                    && BasicTreeUI.this.tree.isVisible(path))                    && BasicTreeUI.this.tree.isVisible(path))
1947              {              {
1948                 if (!cntlClick && !BasicTreeUI.this.isLeaf(row))                 if (!cntlClick && !BasicTreeUI.this.isLeaf(row))
1949                    clickCount++;                 {
1950                      Object cell = path.getLastPathComponent();
1951                      if (lastClicked != null && lastClicked.equals(cell))
1952                         clickCount = 2;
1953                      else
1954                      {
1955                         lastClicked = cell;
1956                         clickCount = 1;
1957                      }
1958                   }
1959    
1960                 if (clickCount == 2 || cntlClick == true)                 if (clickCount == 2 || cntlClick == true)
1961                 {                 {
1962                    clickCount = 0;                    clickCount = 0;
1963                      lastClicked = null;
1964                    BasicTreeUI.this.tree.getSelectionModel().clearSelection();                    BasicTreeUI.this.tree.getSelectionModel().clearSelection();
1965                    if (BasicTreeUI.this.tree.isExpanded(path))                    if (BasicTreeUI.this.tree.isExpanded(path))
1966                    {                    {

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46

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