public class LayerPositionEvent extends LayerCollectionEvent
Event produced when a layer has been or is being moved from a collection of layers.
LAYER_ACTIVATION_CHANGED, LAYER_ADDED, LAYER_ADDING, LAYER_REMOVED, LAYER_REMOVING, LAYER_VISIBILITY_CHANGED
Modifier and Type | Method and Description |
---|---|
static LayerPositionEvent |
createLayerMovedEvent(FLayer lyr,
int oldp,
int newp)
Creates a new layer position event notifying a "layer moved" action.
|
static LayerPositionEvent |
createLayerMovingEvent(FLayer lyr,
int oldp,
int newp)
Creates a new layer position event notifying a "layer moving" action.
|
int |
getNewPos()
Gets the new index of the affected layer in the layer collection.
|
int |
getOldPos()
Gets the previous index of the affected layer in the layer collection.
|
createLayerActivationEvent, createLayerAddedEvent, createLayerAddingEvent, createLayerRemovedEvent, createLayerRemovingEvent, createLayerVisibilityEvent, getAffectedLayer, getLayers
getEventType, setEventType
public static LayerPositionEvent createLayerMovedEvent(FLayer lyr, int oldp, int newp)
Creates a new layer position event notifying a "layer moved" action.
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 collectionpublic static LayerPositionEvent createLayerMovingEvent(FLayer lyr, int oldp, int newp)
Creates a new layer position event notifying a "layer moving" action.
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 collectionpublic int getOldPos()
Gets the previous index of the affected layer in the layer collection.
public int getNewPos()
Gets the new index of the affected layer in the layer collection.