summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gilbert <david.gilbert@object-refinery.com>2006-04-28 14:47:41 +0000
committerDavid Gilbert <david.gilbert@object-refinery.com>2006-04-28 14:47:41 +0000
commit3e55a29a1506bff36de7a0e392c091cc915d2700 (patch)
tree8f257e8ac6a08ba850bae2eb087b3f1ac357d791
parent60a6f66ad1042d2d993417945caf118087d8b8dc (diff)
downloadclasspath-3e55a29a1506bff36de7a0e392c091cc915d2700.tar.gz
2006-04-28 David Gilbert <david.gilbert@object-refinery.com>
* javax/swing/JList.java (getMinSelectionIndex): Return correct value, added API docs, (getMaxSelectionIndex): Added API docs. ----------------------------------------------------------------------
-rw-r--r--ChangeLog6
-rw-r--r--javax/swing/JList.java18
2 files changed, 23 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e887ebc2a..b9ca5ea86 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
2006-04-28 David Gilbert <david.gilbert@object-refinery.com>
* javax/swing/JList.java
+ (getMinSelectionIndex): Return correct value, added API docs,
+ (getMaxSelectionIndex): Added API docs.
+
+2006-04-28 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/JList.java
(JList(Object[])): Pass new model directly to init(),
(JList(Vector)): Likewise,
(JList(ListModel)): Renamed argument and updated API docs,
diff --git a/javax/swing/JList.java b/javax/swing/JList.java
index 3361e05be..63b05a143 100644
--- a/javax/swing/JList.java
+++ b/javax/swing/JList.java
@@ -2048,11 +2048,27 @@ public class JList extends JComponent implements Accessible, Scrollable
return selectionModel.getLeadSelectionIndex();
}
+ /**
+ * Returns the lowest item index in the current selection, or <code>-1</code>
+ * if there is no selection.
+ *
+ * @return The index.
+ *
+ * @see #getMaxSelectionIndex()
+ */
public int getMinSelectionIndex()
{
- return selectionModel.getMaxSelectionIndex();
+ return selectionModel.getMinSelectionIndex();
}
+ /**
+ * Returns the highest item index in the current selection, or
+ * <code>-1</code> if there is no selection.
+ *
+ * @return The index.
+ *
+ * @see #getMinSelectionIndex()
+ */
public int getMaxSelectionIndex()
{
return selectionModel.getMaxSelectionIndex();