< prev index next >

src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java

Print this page

        

@@ -74,11 +74,11 @@
     boolean                     multipleSelections;
     int                         active = NONE;
 
     // Holds the array of the indexes of the elements which is selected
     // This array should be kept sorted, low to high.
-    int                         selected[];
+    int[]                         selected;
     int                         fontHeight;
     int                         fontAscent;
     int                         fontLeading;
 
     // Holds the index of the item used in the previous operation (selectItem, deselectItem)

@@ -172,11 +172,11 @@
 
         // NOTE: needs to have target set
         maxLength = maxLength();
 
         // get the index containing all indexes to selected items
-        int sel[] = l.getSelectedIndexes();
+        int[] sel = l.getSelectedIndexes();
         selected = new int[sel.length];
         // TODO: shouldn't this be arraycopy()?
         for (int i = 0 ; i < sel.length ; i ++) {
             selected[i] = sel[i];
         }

@@ -1145,11 +1145,11 @@
         // delete the items out of the items list and out of the selected list
         for (int i = s ; i <= e ; i++) {
             items.removeElementAt(s);
             int j = posInSel(i);
             if (j != -1) {
-                int newsel[] = new int[selected.length - 1];
+                int[] newsel = new int[selected.length - 1];
                 System.arraycopy(selected, 0, newsel, 0, j);
                 System.arraycopy(selected, j + 1, newsel, j, selected.length - (j + 1));
                 selected = newsel;
             }
 

@@ -1244,11 +1244,11 @@
                     repaint(oldSel, oldSel, PAINT_ITEMS);
                 }
             }
         } else {
             // insert "index" into the selection array
-            int newsel[] = new int[selected.length + 1];
+            int[] newsel = new int[selected.length + 1];
             int i = 0;
             while (i < selected.length && index > selected[i]) {
                 newsel[i] = selected[i];
                 i++;
             }

@@ -1282,11 +1282,11 @@
             // TODO: keep an int[0] and int[1] around and just use them instead
             // creating new ones all the time
             selected = new int[0];
         } else {
             int i = posInSel(index);
-            int newsel[] = new int[selected.length - 1];
+            int[] newsel = new int[selected.length - 1];
             System.arraycopy(selected, 0, newsel, 0, i);
             System.arraycopy(selected, i+1, newsel, i, selected.length - (i+1));
             selected = newsel;
         }
         currentIndex = index;
< prev index next >