Class LayerPositionEvent

All Implemented Interfaces:
FMapEvent

public class LayerPositionEvent extends LayerCollectionEvent

Event produced when a layer has been or is being moved from a collection of layers.

Author:
Vicente Caballero Navarro
  • Method Details

    • createLayerMovedEvent

      public static LayerPositionEvent createLayerMovedEvent(FLayer lyr, int oldp, int newp)

      Creates a new layer position event notifying a "layer moved" action.

      Parameters:
      lyr - layer affected by the action
      oldp - previous index of the affected layer in the layer collection
      newp - new index of the affected layer in the layer collection
      Returns:
      a new layer position event
    • createLayerMovingEvent

      public static LayerPositionEvent createLayerMovingEvent(FLayer lyr, int oldp, int newp)

      Creates a new layer position event notifying a "layer moving" action.

      Parameters:
      lyr - layer affected by the action
      oldp - previous index of the affected layer in the layer collection
      newp - 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