com.guiseframework.event
Class ListSelectionEvent<V>

java.lang.Object
  extended by java.util.EventObject
      extended by com.globalmentor.event.AbstractEvent
          extended by com.guiseframework.event.AbstractGuiseEvent
              extended by com.guiseframework.event.CollectionEvent<E>
                  extended by com.guiseframework.event.SetEvent<java.lang.Integer>
                      extended by com.guiseframework.event.ListSelectionEvent<V>
Type Parameters:
V - The type of values selected.
All Implemented Interfaces:
com.globalmentor.event.Event, GuiseEvent, java.io.Serializable

public class ListSelectionEvent<V>
extends SetEvent<java.lang.Integer>

An event indicating the list selection has been modified. An added or removed element represents an added or removed index of the selection. If neither an added nor a removed element are provided, the event represents a general set modification.

Author:
Garret Wilson
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ListSelectionEvent(ListSelectModel<V> source)
          Source constructor for general selection modification.
ListSelectionEvent(ListSelectModel<V> source, java.lang.Integer addedElement, java.lang.Integer removedElement)
          Source constructor for an added and/or removed element.
 
Method Summary
 ListSelectModel<V> getSource()
          The object on which the event initially occurred.
 
Methods inherited from class com.guiseframework.event.CollectionEvent
getAddedElement, getRemovedElement
 
Methods inherited from class com.guiseframework.event.AbstractGuiseEvent
getSession
 
Methods inherited from class java.util.EventObject
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ListSelectionEvent

public ListSelectionEvent(ListSelectModel<V> source)
Source constructor for general selection modification.

Parameters:
source - The object on which the event initially occurred.
Throws:
java.lang.NullPointerException - if the given source is null.

ListSelectionEvent

public ListSelectionEvent(ListSelectModel<V> source,
                          java.lang.Integer addedElement,
                          java.lang.Integer removedElement)
Source constructor for an added and/or removed element.

Parameters:
source - The object on which the event initially occurred.
addedElement - The index that was added to the selection, or null if no index was added or it is unknown whether or which indices were added.
removedElement - The index that was removed from the selection, or null if no index was removed or it is unknown whether or which indices were removed.
Throws:
java.lang.NullPointerException - if the given source is null.
Method Detail

getSource

public ListSelectModel<V> getSource()
Description copied from interface: com.globalmentor.event.Event
The object on which the event initially occurred.

Specified by:
getSource in interface com.globalmentor.event.Event
Overrides:
getSource in class java.util.EventObject
Returns:
The source of the event.


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.