public class TLspLayerStateSupport extends Object
ILspLayerStateListener
. This class can
be used by ILspLayer
implementations to manage layer state listeners
and firing the corresponding events.Constructor and Description |
---|
TLspLayerStateSupport(ILspLayer aLayer)
Creates a new layer state support for the given layer.
|
Modifier and Type | Method and Description |
---|---|
void |
addLayerStateListener(ILspLayerStateListener aListener)
Adds a layer state listener to be notified of state change events.
|
void |
fireLayerStateChange(TLspLayerPaintStateEvent.Type aType,
TLspPaintRepresentationState aPaintRepresentationState,
Object aOldValue,
Object aNewValue)
Creates a new
TLspLayerStateEvent with the given properties and
dispatches it to all currently registered listeners. |
void |
fireLayerStateChange(TLspLayerPaintStateEvent aEvent)
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 new
TLspLayerStateEvent with the given properties and
dispatches it to all currently registered listeners. |
void |
fireLayerStateChange(TLspLayerStateEvent aEvent)
Propagates the specified layer state change event to all currently
registered listeners.
|
void |
removeLayerStateListener(ILspLayerStateListener aListener)
Removes the specified layer state listener.
|
public TLspLayerStateSupport(ILspLayer aLayer)
aLayer
- the layer that will use this TLspLayerStateSupport
public void addLayerStateListener(ILspLayerStateListener aListener)
aListener
- the listener to be addedpublic void removeLayerStateListener(ILspLayerStateListener aListener)
aListener
- the listener to be removedpublic void fireLayerStateChange(TLspLayerStateEvent aEvent)
aEvent
- the event to be dispatchedpublic void fireLayerStateChange(TLspLayerPaintStateEvent aEvent)
aEvent
- the event to be dispatchedpublic void fireLayerStateChange(TLspLayerPaintStateEvent.Type aType, TLspPaintRepresentationState aPaintRepresentationState, Object aOldValue, Object aNewValue)
TLspLayerStateEvent
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.aType
- the event typeaPaintRepresentationState
- the affected paint representation stateaOldValue
- the old valueaNewValue
- the new valuepublic void fireLayerStateChange(TLspLayerStateEvent.Type aType, TLspPaintRepresentation aPaintRepresentation, Object aOldValue, Object aNewValue)
TLspLayerStateEvent
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.aType
- the event typeaPaintRepresentation
- the affected paint representationaOldValue
- the old valueaNewValue
- the new value