classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: Fixlet for BasicTreeUI


From: Roman Kennke
Subject: [cp-patches] FYI: Fixlet for BasicTreeUI
Date: Thu, 07 Jul 2005 11:08:28 +0200
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050317)

I noticed some jikes warnings in BasicTreeUI. The static fields in javax.swing.tree.TreeSelectionModel were accessed via an instance of this class. I changed this so it is accessed via the class itself.

2005-07-07  Roman Kennke  <address@hidden>

       * javax/swing/plaf/basic/BasicTreeUI.java
       (MouseInputHandler.mouseClicked): Access static TreeSelectionModel
       fields via the class and not via an instance.

/Roman

Index: javax/swing/plaf/basic/BasicTreeUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.java,v
retrieving revision 1.19
diff -u -r1.19 BasicTreeUI.java
--- javax/swing/plaf/basic/BasicTreeUI.java     7 Jul 2005 09:00:11 -0000       
1.19
+++ javax/swing/plaf/basic/BasicTreeUI.java     7 Jul 2005 09:04:12 -0000
@@ -1800,14 +1800,14 @@
           if (BasicTreeUI.this.tree.isRowSelected(row))
             BasicTreeUI.this.tree.removeSelectionRow(row);
           else if (BasicTreeUI.this.tree.getSelectionModel()
-                   .getSelectionMode() == treeSelectionModel
+                   .getSelectionMode() == TreeSelectionModel
                    .SINGLE_TREE_SELECTION)
             {
               BasicTreeUI.this.tree.getSelectionModel().clearSelection();
               BasicTreeUI.this.tree.addSelectionRow(row);
             } 
           else if (BasicTreeUI.this.tree.getSelectionModel()
-                   .getSelectionMode() == treeSelectionModel
+                   .getSelectionMode() == TreeSelectionModel
                    .CONTIGUOUS_TREE_SELECTION)
             {
               // TODO
@@ -1815,7 +1815,7 @@
           else
             {
               BasicTreeUI.this.tree.getSelectionModel().setSelectionMode
-                (treeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
+                (TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
               BasicTreeUI.this.tree.addSelectionRow(row);
             }
         }              

reply via email to

[Prev in Thread] Current Thread [Next in Thread]