public class TLcdSelectionChangedEvent<T> extends EventObject
source
Constructor and Description |
---|
TLcdSelectionChangedEvent(ILcdSelection<T> aSelection,
Map<T,Boolean> aSelectionChanges)
Creates a new
TLcdSelectionChangedEvent with the given information. |
TLcdSelectionChangedEvent(ILcdSelection<T> aSelection,
Vector<T> aSelectedObjects,
Vector<T> aDeselectedObjects)
Deprecated.
use the constructor with the map.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsElement(T aObject)
Returns whether
aObject is associated to this TLcdSelectionChangedEvent |
Enumeration<T> |
deselectedElements()
Returns all objects for which the state has changed from selected to deselected.
|
int |
elementCount()
Returns the number of
Objects for which the selection state has changed. |
Enumeration |
elements()
Deprecated.
Use
getChangedObjects() instead |
Collection<T> |
getChangedObjects()
Returns the objects for which the selection state has changed.
|
T |
getElementAt(int aIndex)
Returns the object at a given index for which the selection state has changed.
|
ILcdSelection<T> |
getSelection()
Returns the
ILcdSelection that has fired this TLcdSelectionChangedEvent . |
boolean |
retrieveChange(T aObject)
Returns the details concerning
aObject in this TLcdModelChangedEvent ,
false if the object has been deselected, true if the object
has been selected. |
Enumeration<T> |
selectedElements()
Returns all objects for which the state has changed from deselected to selected.
|
String |
toString() |
getSource
public TLcdSelectionChangedEvent(ILcdSelection<T> aSelection, Vector<T> aSelectedObjects, Vector<T> aDeselectedObjects)
TLcdSelectionChangedEvent
with the given information.aSelection
- the ILcdSelection
that is firing this
TLcdSelectionChangedEvent
.aSelectedObjects
- the objects for which the selection state changed from not selected to
selected.aDeselectedObjects
- the objects for which the selection state changed from selected to not
selected.
>Note: an object should only be in one of the vectors, not in both.public TLcdSelectionChangedEvent(ILcdSelection<T> aSelection, Map<T,Boolean> aSelectionChanges)
TLcdSelectionChangedEvent
with the given information.aSelection
- the ILcdSelection
that is firing this
TLcdSelectionChangedEvent
.aSelectionChanges
- the Map
containing the selection changes.
The keys of this Map
must be the objects whose selection states have
changed. The value associated to a given key must be a Boolean
instance
that is true
if the Object
has been selected or
false
if it has been deselected.
It is recommended to use an IdentityHashMap.public Collection<T> getChangedObjects()
retrieveChange(T)
public ILcdSelection<T> getSelection()
ILcdSelection
that has fired this TLcdSelectionChangedEvent
.
This the same Object
as the one returned by getSource()
.ILcdSelection
that has fired this TLcdSelectionChangedEvent
.
This the same Object
as the one returned by getSource()
.public Enumeration elements()
getChangedObjects()
insteadretrieveChange(T)
,
deselectedElements()
,
selectedElements()
public int elementCount()
Objects
for which the selection state has changed.Objects
for which the selection state has changed.public T getElementAt(int aIndex)
public Enumeration<T> selectedElements()
public Enumeration<T> deselectedElements()
public boolean containsElement(T aObject)
aObject
is associated to this TLcdSelectionChangedEvent
aObject
is associated to this TLcdSelectionChangedEvent
public boolean retrieveChange(T aObject)
aObject
in this TLcdModelChangedEvent
,
false
if the object has been deselected, true
if the object
has been selected.
Warning: to retrieve the changes for all objects use the methods selectedElements()
and deselectedElements()
which result in a better performance.aObject
in this TLcdModelChangedEvent
,
false
if the object has been deselected, true
if the object
has been selected.IllegalArgumentException
- when a object was passed which was not in the selection changes.public String toString()
toString
in class EventObject