Package com.luciad.util
Class TLcdSelectionChangedEvent<T>
java.lang.Object
java.util.EventObject
com.luciad.util.TLcdSelectionChangedEvent<T>
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionTLcdSelectionChangedEvent
(ILcdSelection<T> aSelection, Map<T, Boolean> aSelectionChanges) Creates a newTLcdSelectionChangedEvent
with the given information.TLcdSelectionChangedEvent
(ILcdSelection<T> aSelection, Vector<T> aSelectedObjects, Vector<T> aDeselectedObjects) Deprecated.use the constructor with the map. -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsElement
(T aObject) Returns whetheraObject
is associated to thisTLcdSelectionChangedEvent
Returns all objects for which the state has changed from selected to deselected.int
Returns the number ofObjects
for which the selection state has changed.elements()
Deprecated.UsegetChangedObjects()
insteadReturns the objects for which the selection state has changed.getElementAt
(int aIndex) Returns the object at a given index for which the selection state has changed.Returns theILcdSelection
that has fired thisTLcdSelectionChangedEvent
.boolean
retrieveChange
(T aObject) Returns the details concerningaObject
in thisTLcdModelChangedEvent
,false
if the object has been deselected,true
if the object has been selected.Returns all objects for which the state has changed from deselected to selected.toString()
Methods inherited from class java.util.EventObject
getSource
-
Constructor Details
-
TLcdSelectionChangedEvent
public TLcdSelectionChangedEvent(ILcdSelection<T> aSelection, Vector<T> aSelectedObjects, Vector<T> aDeselectedObjects) Deprecated.use the constructor with the map.Creates a newTLcdSelectionChangedEvent
with the given information.- Parameters:
aSelection
- theILcdSelection
that is firing thisTLcdSelectionChangedEvent
.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.
-
TLcdSelectionChangedEvent
Creates a newTLcdSelectionChangedEvent
with the given information.- Parameters:
aSelection
- theILcdSelection
that is firing thisTLcdSelectionChangedEvent
.aSelectionChanges
- theMap
containing the selection changes. The keys of thisMap
must be the objects whose selection states have changed. The value associated to a given key must be aBoolean
instance that istrue
if theObject
has been selected orfalse
if it has been deselected. It is recommended to use an IdentityHashMap.
-
-
Method Details
-
getChangedObjects
Returns the objects for which the selection state has changed.- Returns:
- the objects for which the selection state has changed.
- See Also:
-
getSelection
Returns theILcdSelection
that has fired thisTLcdSelectionChangedEvent
. This the sameObject
as the one returned bygetSource()
.- Returns:
- the
ILcdSelection
that has fired thisTLcdSelectionChangedEvent
. This the sameObject
as the one returned bygetSource()
.
-
elements
Deprecated.UsegetChangedObjects()
insteadReturns an Enumeration of all the objects for which the selection state has changed.- Returns:
- an Enumeration of all the objects for which the selection state has changed.
- See Also:
-
elementCount
public int elementCount()Returns the number ofObjects
for which the selection state has changed.- Returns:
- the number of
Objects
for which the selection state has changed.
-
getElementAt
Returns the object at a given index for which the selection state has changed.- Returns:
- the object at a given index for which the selection state has changed.
-
selectedElements
Returns all objects for which the state has changed from deselected to selected.- Returns:
- all objects for which the state has changed from deselected to selected.
-
deselectedElements
Returns all objects for which the state has changed from selected to deselected.- Returns:
- all objects for which the state has changed from selected to deselected.
-
containsElement
Returns whetheraObject
is associated to thisTLcdSelectionChangedEvent
- Returns:
- whether
aObject
is associated to thisTLcdSelectionChangedEvent
-
retrieveChange
Returns the details concerningaObject
in thisTLcdModelChangedEvent
,false
if the object has been deselected,true
if the object has been selected. Warning: to retrieve the changes for all objects use the methodsselectedElements()
anddeselectedElements()
which result in a better performance.- Returns:
- the details concerning
aObject
in thisTLcdModelChangedEvent
,false
if the object has been deselected,true
if the object has been selected. - Throws:
IllegalArgumentException
- when a object was passed which was not in the selection changes.
-
toString
- Overrides:
toString
in classEventObject
-