Class LayerCollectionEvent

java.lang.Object
org.gvsig.fmap.mapcontext.events.FMapEventBase
org.gvsig.fmap.mapcontext.layers.LayerCollectionEvent
All Implemented Interfaces:
FMapEvent
Direct Known Subclasses:
LayerPositionEvent

public class LayerCollectionEvent extends FMapEventBase

Event produced when a layer is been added or removed, or has been added or removed, or its visibility or activation state has changed from a collection of layers.

Author:
Vicente Caballero Navarro
  • Field Details

    • LAYER_ADDED

      public static final int LAYER_ADDED

      Identifies this event as a action on a layer that has been added.

      See Also:
    • LAYER_REMOVED

      public static final int LAYER_REMOVED

      Identifies this event as a action on a layer that has been removed.

      See Also:
    • LAYER_ADDING

      public static final int LAYER_ADDING

      Identifies this event as a action on a layer that is being added.

      See Also:
    • LAYER_REMOVING

      public static final int LAYER_REMOVING

      Identifies this event as a action on a layer that is being removed.

      See Also:
    • LAYER_ACTIVATION_CHANGED

      public static final int LAYER_ACTIVATION_CHANGED

      Identifies this event as a action of change of the activation status of a layer.

      See Also:
    • LAYER_VISIBILITY_CHANGED

      public static final int LAYER_VISIBILITY_CHANGED

      Identifies this event as a action of change of the visibility status of a layer.

      See Also:
  • Constructor Details

    • LayerCollectionEvent

      protected LayerCollectionEvent(FLayer lyr, int eventType)

      Creates a new layer collection event of the specified type.

      Parameters:
      lyr - layer affected by the action
      eventType - type of layer collection event
  • Method Details

    • createLayerAddedEvent

      public static LayerCollectionEvent createLayerAddedEvent(FLayer lyr)

      Creates a new layer collection event notifying a "layer added" action.

      Parameters:
      lyr - layer affected by the action
      Returns:
      a new layer collection event
    • createLayerRemovedEvent

      public static LayerCollectionEvent createLayerRemovedEvent(FLayer lyr)

      Creates a new layer collection event notifying a "layer removed" action.

      Parameters:
      lyr - layer affected by the action
      Returns:
      a new layer collection event
    • createLayerAddingEvent

      public static LayerCollectionEvent createLayerAddingEvent(FLayer lyr)

      Creates a new layer collection event notifying a "layer adding" action.

      Parameters:
      lyr - layer affected by the action
      Returns:
      a new layer collection event
    • createLayerRemovingEvent

      public static LayerCollectionEvent createLayerRemovingEvent(FLayer lyr)

      Creates a new layer collection event notifying a "layer removing" action.

      Parameters:
      lyr - layer affected by the action
      Returns:
      a new layer collection event
    • createLayerActivationEvent

      public static LayerCollectionEvent createLayerActivationEvent(FLayer lyr)

      Creates a new layer collection event notifying a "layer activation changed" action.

      Parameters:
      lyr - layer affected by the action
      Returns:
      a new layer collection event
    • createLayerVisibilityEvent

      public static LayerCollectionEvent createLayerVisibilityEvent(FLayer lyr)

      Creates a new layer collection event notifying a "layer visibility changed" action.

      Parameters:
      lyr - layer affected by the action
      Returns:
      a new layer collection event
    • getLayers

      public FLayers getLayers()

      Gets the collection of layers which the layer affected belongs.

      Returns:
      the collection of layers affected
    • getAffectedLayer

      public FLayer getAffectedLayer()

      Gets the layer that this event references.

      Returns:
      the layer that this event references