Package org.gvsig.fmap.mapcontext.layers
Class LayerPositionEvent
java.lang.Object
org.gvsig.fmap.mapcontext.events.FMapEventBase
org.gvsig.fmap.mapcontext.layers.LayerCollectionEvent
org.gvsig.fmap.mapcontext.layers.LayerPositionEvent
- All Implemented Interfaces:
FMapEvent
Event produced when a layer has been or is being moved from a collection of layers.
- Author:
- Vicente Caballero Navarro
-
Field Summary
Fields inherited from class org.gvsig.fmap.mapcontext.layers.LayerCollectionEvent
LAYER_ACTIVATION_CHANGED, LAYER_ADDED, LAYER_ADDING, LAYER_REMOVED, LAYER_REMOVING, LAYER_VISIBILITY_CHANGED -
Method Summary
Modifier and TypeMethodDescriptionstatic LayerPositionEventcreateLayerMovedEvent(FLayer lyr, int oldp, int newp) Creates a new layer position event notifying a "layer moved" action.static LayerPositionEventcreateLayerMovingEvent(FLayer lyr, int oldp, int newp) Creates a new layer position event notifying a "layer moving" action.intGets the new index of the affected layer in the layer collection.intGets the previous index of the affected layer in the layer collection.Methods inherited from class org.gvsig.fmap.mapcontext.layers.LayerCollectionEvent
createLayerActivationEvent, createLayerAddedEvent, createLayerAddingEvent, createLayerRemovedEvent, createLayerRemovingEvent, createLayerVisibilityEvent, getAffectedLayer, getLayersMethods inherited from class org.gvsig.fmap.mapcontext.events.FMapEventBase
getEventType, setEventType
-
Method Details
-
createLayerMovedEvent
Creates a new layer position event notifying a "layer moved" action.
- Parameters:
lyr- layer affected by the actionoldp- previous index of the affected layer in the layer collectionnewp- new index of the affected layer in the layer collection- Returns:
- a new layer position event
-
createLayerMovingEvent
Creates a new layer position event notifying a "layer moving" action.
- Parameters:
lyr- layer affected by the actionoldp- previous index of the affected layer in the layer collectionnewp- new index of the affected layer in the layer collection- Returns:
- a new layer position event
-
getOldPos
public int getOldPos()Gets the previous index of the affected layer in the layer collection.
- Returns:
- the previous index
-
getNewPos
public int getNewPos()Gets the new index of the affected layer in the layer collection.
- Returns:
- the new index
-