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
ConstructorsConstructorDescriptionTLcdSelectionChangedEvent(ILcdSelection<T> aSelection, Map<T, Boolean> aSelectionChanges) Creates a newTLcdSelectionChangedEventwith the given information.TLcdSelectionChangedEvent(ILcdSelection<T> aSelection, Vector<T> aSelectedObjects, Vector<T> aDeselectedObjects) Deprecated.use the constructor with the map. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsElement(T aObject) Returns whetheraObjectis associated to thisTLcdSelectionChangedEventReturns all objects for which the state has changed from selected to deselected.intReturns the number ofObjectsfor 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 theILcdSelectionthat has fired thisTLcdSelectionChangedEvent.booleanretrieveChange(T aObject) Returns the details concerningaObjectin thisTLcdModelChangedEvent,falseif the object has been deselected,trueif 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 newTLcdSelectionChangedEventwith the given information.- Parameters:
aSelection- theILcdSelectionthat 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 newTLcdSelectionChangedEventwith the given information.- Parameters:
aSelection- theILcdSelectionthat is firing thisTLcdSelectionChangedEvent.aSelectionChanges- theMapcontaining the selection changes. The keys of thisMapmust be the objects whose selection states have changed. The value associated to a given key must be aBooleaninstance that istrueif theObjecthas been selected orfalseif 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 theILcdSelectionthat has fired thisTLcdSelectionChangedEvent. This the sameObjectas the one returned bygetSource().- Returns:
- the
ILcdSelectionthat has fired thisTLcdSelectionChangedEvent. This the sameObjectas 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 ofObjectsfor which the selection state has changed.- Returns:
- the number of
Objectsfor 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 whetheraObjectis associated to thisTLcdSelectionChangedEvent- Returns:
- whether
aObjectis associated to thisTLcdSelectionChangedEvent
-
retrieveChange
Returns the details concerningaObjectin thisTLcdModelChangedEvent,falseif the object has been deselected,trueif 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
aObjectin thisTLcdModelChangedEvent,falseif the object has been deselected,trueif the object has been selected. - Throws:
IllegalArgumentException- when a object was passed which was not in the selection changes.
-
toString
- Overrides:
toStringin classEventObject
-