Class EventBuffer
- All Implemented Interfaces:
ViewPortListener,ViewPortListenerEx1,LayerCollectionListener,LayerListener,SelectionListener,LegendListener
EventBuffer represents a buffer of events that allows store
listeners of events produced in layers of a MapContext instance,
and configure its dispatching mode.
The dispatching mode:
true: dispatches each new event received.false: accumulates all new events received in a internal buffer, and only will dispatch them (according to the order they were received) when changes the mode.
- Author:
- gvSIG Team
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled when the activation of a layer has changed.booleanaddAtomicEventListener(AtomicEventListener listener) Appends, if wasn't, the specified listener to the end of the internal list of atomic event listeners.voidCalled when the background color of the view port has changed.voidEnables buffer in accumulation event mode.voidCalled when a draw value of a layer has changed.voidCalled when the edition of a layer has changed.voidDisables buffer in accumulation event mode.voidCalled when the extent of the view port has changed.voidCalled when a layer has been added or replaced in the internal list of layers.voidCalled when a layer is just going to be added or replaced in the internal list of layers.voidCalled when a layer has been moved in the internal list of layers.voidCalled when a layer is just going to be moved in the internal list of layers.voidCalled when a layer has been removed from the internal list of layers.voidCalled when a layer is just going to be removed from the internal list of layers.voidCalled when the legend of a vector layer has changed.voidCalled when the name of a layer has changed.voidCalled when the projection of the view port has changed.booleanremoveAtomicEventListener(AtomicEventListener listener) Removes a single instance of theAtomicEventListenerfrom the internal list, if it is present (optional operation).Returns true if the list contained the specified element (or equivalently, if the list changed as a result of the call) .voidCalled when the selection in a vector layer has changed.voidCalled when the selection color of the view port has changed.voidCalled when the visibility of the collection of layers has changed.voidCalled when the visibility of a layer has changed.
-
Constructor Details
-
EventBuffer
public EventBuffer()
-
-
Method Details
-
beginAtomicEvent
public void beginAtomicEvent()Enables buffer in accumulation event mode. All new events received, will be accumulated and won't notified to their respective listeners, until this buffer would received a call toendAtomicEvent.- See Also:
-
endAtomicEvent
public void endAtomicEvent()Disables buffer in accumulation event mode. All events accumulated will be notify to their respective listeners, in the same order as they arrived.- See Also:
-
legendChanged
Description copied from interface:LegendListenerCalled when the legend of a vector layer has changed.- Specified by:
legendChangedin interfaceLegendListener- Parameters:
e- theLegendChangedEventcontains contextual information about the event
-
layerAdded
Description copied from interface:LayerCollectionListenerCalled when a layer has been added or replaced in the internal list of layers.
- Specified by:
layerAddedin interfaceLayerCollectionListener- Parameters:
e- a layer collection event object
-
layerMoved
Description copied from interface:LayerCollectionListenerCalled when a layer has been moved in the internal list of layers.
- Specified by:
layerMovedin interfaceLayerCollectionListener- Parameters:
e- a layer collection event object
-
layerRemoved
Description copied from interface:LayerCollectionListenerCalled when a layer has been removed from the internal list of layers.
- Specified by:
layerRemovedin interfaceLayerCollectionListener- Parameters:
e- a layer collection event object
-
layerAdding
Description copied from interface:LayerCollectionListenerCalled when a layer is just going to be added or replaced in the internal list of layers.
- Specified by:
layerAddingin interfaceLayerCollectionListener- Parameters:
e- a layer collection event object- Throws:
CancelationException- if cancels the adding operation, this exception will have the message that user will see.
-
layerMoving
Description copied from interface:LayerCollectionListenerCalled when a layer is just going to be moved in the internal list of layers.
- Specified by:
layerMovingin interfaceLayerCollectionListener- Parameters:
e- a layer collection event object- Throws:
CancelationException- if cancels the moving operation, this exception will have the message that user will see.
-
layerRemoving
Description copied from interface:LayerCollectionListenerCalled when a layer is just going to be removed from the internal list of layers.
- Specified by:
layerRemovingin interfaceLayerCollectionListener- Parameters:
e- a layer collection event object- Throws:
CancelationException- if cancels the removing operation, this exception will have the message that user will see.
-
visibilityChanged
Description copied from interface:LayerCollectionListenerCalled when the visibility of the collection of layers has changed.
- Specified by:
visibilityChangedin interfaceLayerCollectionListener- Parameters:
e- a layer collection event object- Throws:
CancelationException- if cancels the operation of change visibility, this exception will have the message that user will see.
-
selectionChanged
Description copied from interface:SelectionListenerCalled when the selection in a vector layer has changed.
The
SelectionEventevent must be launched invoking thefireSelectionEventsmethod of the layer.- Specified by:
selectionChangedin interfaceSelectionListener- Parameters:
e- a selection event on a vector layer
-
extentChanged
Description copied from interface:ViewPortListenerCalled when the extent of the view port has changed.
- Specified by:
extentChangedin interfaceViewPortListener- Parameters:
e- an extend event object
-
addAtomicEventListener
Appends, if wasn't, the specified listener to the end of the internal list of atomic event listeners.- Parameters:
listener- an object that implements the atomic event listener- Returns:
trueif has added the listener successfully; otherwisefalse- See Also:
-
getAtomicEventListeners
-
removeAtomicEventListener
Removes a single instance of the
AtomicEventListenerfrom the internal list, if it is present (optional operation).Returns true if the list contained the specified element (or equivalently, if the list changed as a result of the call) .- Parameters:
listener- , element to be removed from this list, if present- Returns:
- true if the list contained the specified element
- See Also:
-
visibilityChanged
Description copied from interface:LayerListenerCalled when the visibility of a layer has changed.
- Specified by:
visibilityChangedin interfaceLayerListener- Parameters:
e- a visibility changed layer event object
-
activationChanged
Description copied from interface:LayerListenerCalled when the activation of a layer has changed.
- Specified by:
activationChangedin interfaceLayerListener- Parameters:
e- an activation changed layer event object
-
nameChanged
Description copied from interface:LayerListenerCalled when the name of a layer has changed.
- Specified by:
nameChangedin interfaceLayerListener- Parameters:
e- a name changed layer event object
-
backColorChanged
Description copied from interface:ViewPortListenerCalled when the background color of the view port has changed.
- Specified by:
backColorChangedin interfaceViewPortListener- Parameters:
e- a color event object
-
selectionColorChanged
Description copied from interface:ViewPortListenerEx1Called when the selection color of the view port has changed.
- Specified by:
selectionColorChangedin interfaceViewPortListenerEx1- Parameters:
e- a color event object
-
editionChanged
Description copied from interface:LayerListenerCalled when the edition of a layer has changed.
- Specified by:
editionChangedin interfaceLayerListener- Parameters:
e- an edition changed layer event object
-
projectionChanged
Description copied from interface:ViewPortListenerCalled when the projection of the view port has changed.
- Specified by:
projectionChangedin interfaceViewPortListener- Parameters:
e- a projection event object
-
drawValueChanged
Description copied from interface:LayerListenerCalled when a draw value of a layer has changed.
- Specified by:
drawValueChangedin interfaceLayerListener- Parameters:
e- an edition changed layer event object
-