Package com.luciad.view.lightspeed.layer
Class TLspLayerStateSupport
java.lang.Object
com.luciad.view.lightspeed.layer.TLspLayerStateSupport
Helper class for working with
ILspLayerStateListener
. This class can
be used by ILspLayer
implementations to manage layer state listeners
and firing the corresponding events.- Since:
- 2012.0
-
Constructor Summary
ConstructorDescriptionTLspLayerStateSupport
(ILspLayer aLayer) Creates a new layer state support for the given layer. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLayerStateListener
(ILspLayerStateListener aListener) Adds a layer state listener to be notified of state change events.void
Propagates the specified layer state change event to all currently registered listeners.void
fireLayerStateChange
(TLspLayerPaintStateEvent.Type aType, TLspPaintRepresentationState aPaintRepresentationState, Object aOldValue, Object aNewValue) Creates a newTLspLayerStateEvent
with the given properties and dispatches it to all currently registered listeners.void
Propagates the specified layer state change event to all currently registered listeners.void
fireLayerStateChange
(TLspLayerStateEvent.Type aType, TLspPaintRepresentation aPaintRepresentation, Object aOldValue, Object aNewValue) Creates a newTLspLayerStateEvent
with the given properties and dispatches it to all currently registered listeners.void
removeLayerStateListener
(ILspLayerStateListener aListener) Removes the specified layer state listener.
-
Constructor Details
-
TLspLayerStateSupport
Creates a new layer state support for the given layer.- Parameters:
aLayer
- the layer that will use thisTLspLayerStateSupport
-
-
Method Details
-
addLayerStateListener
Adds a layer state listener to be notified of state change events.- Parameters:
aListener
- the listener to be added
-
removeLayerStateListener
Removes the specified layer state listener.- Parameters:
aListener
- the listener to be removed
-
fireLayerStateChange
Propagates the specified layer state change event to all currently registered listeners.- Parameters:
aEvent
- the event to be dispatched
-
fireLayerStateChange
Propagates the specified layer state change event to all currently registered listeners.- Parameters:
aEvent
- the event to be dispatched
-
fireLayerStateChange
public void fireLayerStateChange(TLspLayerPaintStateEvent.Type aType, TLspPaintRepresentationState aPaintRepresentationState, Object aOldValue, Object aNewValue) Creates a newTLspLayerStateEvent
with the given properties and dispatches it to all currently registered listeners. The source of the generated event will be the layer passed to the constructor of this class.- Parameters:
aType
- the event typeaPaintRepresentationState
- the affected paint representation stateaOldValue
- the old valueaNewValue
- the new value
-
fireLayerStateChange
public void fireLayerStateChange(TLspLayerStateEvent.Type aType, TLspPaintRepresentation aPaintRepresentation, Object aOldValue, Object aNewValue) Creates a newTLspLayerStateEvent
with the given properties and dispatches it to all currently registered listeners. The source of the generated event will be the layer passed to the constructor of this class.- Parameters:
aType
- the event typeaPaintRepresentation
- the affected paint representationaOldValue
- the old valueaNewValue
- the new value
-