diff options
author | David Gilbert <david.gilbert@object-refinery.com> | 2006-03-03 17:05:41 +0000 |
---|---|---|
committer | David Gilbert <david.gilbert@object-refinery.com> | 2006-03-03 17:05:41 +0000 |
commit | 225b2f4027587db4809e1add87aca4901615230e (patch) | |
tree | 3655ce83d692e3ab25a49c340e703d8b92645956 | |
parent | d73b4ac8ad5fc508ab965dc270e16fb4b420b358 (diff) | |
download | classpath-225b2f4027587db4809e1add87aca4901615230e.tar.gz |
2006-03-03 David Gilbert <david.gilbert@object-refinery.com>
* javax/swing/event/ListSelectionEvent.java
(toString): Implemented,
plus updated API docs all over.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | javax/swing/event/ListSelectionEvent.java | 62 |
2 files changed, 46 insertions, 22 deletions
@@ -1,5 +1,11 @@ 2006-03-03 David Gilbert <david.gilbert@object-refinery.com> + * javax/swing/event/ListSelectionEvent.java + (toString): Implemented, + plus updated API docs all over. + +2006-03-03 David Gilbert <david.gilbert@object-refinery.com> + * javax/swing/event/ListSelectionEvent.java: Reformatted and fixed API doc warnings, * javax/swing/event/ListSelectionListener.java: Updated API docs. diff --git a/javax/swing/event/ListSelectionEvent.java b/javax/swing/event/ListSelectionEvent.java index f041faea8..d79cbfa50 100644 --- a/javax/swing/event/ListSelectionEvent.java +++ b/javax/swing/event/ListSelectionEvent.java @@ -39,35 +39,45 @@ package javax.swing.event; import java.util.EventObject; +import javax.swing.ListSelectionModel; + /** - * ListSelectionEvent + * An event that indicates a change to a list selection, including the source + * of the change (a {@link ListSelectionModel}) and the range of items in the + * list that have potentially changed their selection status. + * * @author Andrew Selkirk * @author Ronald Veldema */ public class ListSelectionEvent extends EventObject { - /** - * firstIndex + /** + * The index of the first list item in the range of items that has + * potentially had its selection status modified. */ private int firstIndex = 0; - /** - * lastIndex + /** + * The index of the last list item in the range of items that has + * potentially had its selection status modified. */ private int lastIndex = 0; - /** - * isAdjusting - */ + /** A flag that indicates that this event is one in a series of events. */ private boolean isAdjusting = false; /** - * Constructor ListSelectionEvent - * @param source Source - * @param firstIndex First index - * @param lastIndex Last index - * @param isAdjusting Is Adjusting? + * Creates a new <code>ListSelectionEvent</code>. + * + * @param source the event source (<code>null</code> not permitted). + * @param firstIndex the first index. + * @param lastIndex the last index. + * @param isAdjusting a flag indicating that this event is one in a series + * of events updating a selection. + * + * @throws IllegalArgumentException if <code>source</code> is + * <code>null</code>. */ public ListSelectionEvent(Object source, int firstIndex, int lastIndex, boolean isAdjusting) @@ -79,8 +89,9 @@ public class ListSelectionEvent extends EventObject } /** - * getFirstIndex - * @return firstIndex + * Returns the first index. + * + * @return The first index. */ public int getFirstIndex() { @@ -88,8 +99,9 @@ public class ListSelectionEvent extends EventObject } /** - * getLastIndex - * @return lastIndex + * Returns the last index. + * + * @return The last index. */ public int getLastIndex() { @@ -97,8 +109,10 @@ public class ListSelectionEvent extends EventObject } /** - * getValueIsAdjusting - * @return isAdjusting + * Returns the flag that indicates that this event is one in a series of + * events updating a selection. + * + * @return A boolean. */ public boolean getValueIsAdjusting() { @@ -106,12 +120,16 @@ public class ListSelectionEvent extends EventObject } /** - * String representation - * @return String representation + * Returns a string representation of the event, typically used for debugging + * purposes. + * + * @return A string representation of the event. */ public String toString() { - return null; // TODO + return this.getClass().toString() + "[ source=" + source.toString() + + " firstIndex= " + firstIndex + " lastIndex= " + lastIndex + + " isAdjusting= " + isAdjusting + " ]"; } } |