harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r495312 - in /harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree: DefaultTreeSelectionModel.java PathPlaceHolder.java
Date Thu, 11 Jan 2007 17:57:14 GMT
Author: apetrenko
Date: Thu Jan 11 09:57:13 2007
New Revision: 495312

URL: http://svn.apache.org/viewvc?view=rev&rev=495312
Log:
Patch for HARMONY-2980 "[swing][tree] method DefaultTreeSelectionModel.notifyPathChange has
wrong signature" and some additional generification

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultTreeSelectionModel.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/PathPlaceHolder.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultTreeSelectionModel.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultTreeSelectionModel.java?view=diff&rev=495312&r1=495311&r2=495312
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultTreeSelectionModel.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultTreeSelectionModel.java
Thu Jan 11 09:57:13 2007
@@ -334,7 +334,7 @@
         return arePathsContiguous(hashSetToTreePathArray(rows));
     }
 
-    protected void notifyPathChange(final Vector changedPaths,
+    protected void notifyPathChange(final Vector<PathPlaceHolder> changedPaths,
                                     final TreePath oldLeadSelection) {
 
         if (changedPaths == null || changedPaths.size() == 0 ){
@@ -401,7 +401,7 @@
         }
     }
 
-    private Vector createPlaceHolders(final TreePath[] oldSelection,
+    private Vector<PathPlaceHolder> createPlaceHolders(final TreePath[] oldSelection,
                                       final TreePath[] newSelection) {
 
         final HashSet addedElements = arrayToHashSet(newSelection);
@@ -409,7 +409,7 @@
         addedElements.removeAll(removedElements);
         removedElements.removeAll(arrayToHashSet(newSelection));
 
-        Vector result = PathPlaceHolder.createPathsPlaceHolders(hashSetToTreePathArray(addedElements),
true);
+        Vector<PathPlaceHolder> result = PathPlaceHolder.createPathsPlaceHolders(hashSetToTreePathArray(addedElements),
true);
         result.addAll(PathPlaceHolder.createPathsPlaceHolders(hashSetToTreePathArray(removedElements),
false));
 
         return result;

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/PathPlaceHolder.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/PathPlaceHolder.java?view=diff&rev=495312&r1=495311&r2=495312
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/PathPlaceHolder.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/PathPlaceHolder.java
Thu Jan 11 09:57:13 2007
@@ -34,31 +34,31 @@
         this.isNew = isNew;
     }
 
-    static TreePath[] getPathsArray(final Vector pathPlaceHolders) {
+    static TreePath[] getPathsArray(final Vector<PathPlaceHolder> pathPlaceHolders)
{
         if (pathPlaceHolders == null) {
             return new TreePath[0];
         }
 
         TreePath[] result = new TreePath[pathPlaceHolders.size()];
         for (int i = 0; i < result.length; i++) {
-            result[i] = ((PathPlaceHolder)pathPlaceHolders.get(i)).path;
+            result[i] = pathPlaceHolders.get(i).path;
         }
         return result;
     }
 
-    static boolean[] getAreNewArray(final Vector pathPlaceHolders) {
+    static boolean[] getAreNewArray(final Vector<PathPlaceHolder> pathPlaceHolders)
{
         if (pathPlaceHolders == null) {
             return new boolean[0];
         }
 
         boolean[] result = new boolean[pathPlaceHolders.size()];
         for (int i = 0; i < result.length; i++) {
-            result[i] = ((PathPlaceHolder)pathPlaceHolders.get(i)).isNew;
+            result[i] = pathPlaceHolders.get(i).isNew;
         }
         return result;
     }
 
-    static Vector createPathsPlaceHolders(final TreePath[] paths, final boolean areNew) {
+    static Vector<PathPlaceHolder> createPathsPlaceHolders(final TreePath[] paths,
final boolean areNew) {
         if (paths == null) {
             return new Vector();
         }



Mime
View raw message