org.geotools.map.event
Class MapLayerListEvent

Object
  extended by EventObject
      extended by MapLayerListEvent
All Implemented Interfaces:
Serializable

public class MapLayerListEvent
extends EventObject

Event object used to report changes in the list of layers managed by a MapContext

Author:
wolf
See Also:
Serialized Form

Field Summary
 
Fields inherited from class EventObject
source
 
Constructor Summary
MapLayerListEvent(MapContent map, Layer element, int index)
           
MapLayerListEvent(MapContent map, Layer element, int fromIndex, int toIndex)
           
MapLayerListEvent(MapContent map, Layer element, int index, MapLayerEvent mapLayerEvent)
           
MapLayerListEvent(MapContext source, MapLayer layer, int position)
          Creates a new instance of MapLayerListEvent
MapLayerListEvent(MapContext source, MapLayer layer, int fromIndex, int toIndex)
          Creates a new instance of MapLayerListEvent
MapLayerListEvent(MapContext source, MapLayer layer, int position, MapLayerEvent mapLayerEvent)
          Creates a new instance of MapLayerListEvent passing on an event from a layer.
 
Method Summary
 Layer getElement()
          Returns the layer involved in the change
 int getFromIndex()
          Returns the index of the first layer involved in the change
 MapLayer getLayer()
          Return the layer involved in the change.
 MapLayerEvent getMapLayerEvent()
          Returns the map layer event that originated this layer list event
 int getToIndex()
          Returns the index of the last layer involved in the change
 
Methods inherited from class EventObject
getSource, toString
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapLayerListEvent

public MapLayerListEvent(MapContext source,
                         MapLayer layer,
                         int fromIndex,
                         int toIndex)
Creates a new instance of MapLayerListEvent

Parameters:
source - DOCUMENT ME!
layer - DOCUMENT ME!
fromIndex - DOCUMENT ME!
toIndex - DOCUMENT ME!

MapLayerListEvent

public MapLayerListEvent(MapContext source,
                         MapLayer layer,
                         int position)
Creates a new instance of MapLayerListEvent

Parameters:
source - Map issuing the event
layer - Layer being reported against; may be null
position - index modified in layer list

MapLayerListEvent

public MapLayerListEvent(MapContext source,
                         MapLayer layer,
                         int position,
                         MapLayerEvent mapLayerEvent)
Creates a new instance of MapLayerListEvent passing on an event from a layer.

Parameters:
source - Map issuing the event
layer - Layer issuing the event
position - Position in the layer list
mapLayerEvent - Event provided from the layer

MapLayerListEvent

public MapLayerListEvent(MapContent map,
                         Layer element,
                         int index)

MapLayerListEvent

public MapLayerListEvent(MapContent map,
                         Layer element,
                         int fromIndex,
                         int toIndex)

MapLayerListEvent

public MapLayerListEvent(MapContent map,
                         Layer element,
                         int index,
                         MapLayerEvent mapLayerEvent)
Method Detail

getElement

public Layer getElement()
Returns the layer involved in the change

Returns:
Value of property layer.

getLayer

public MapLayer getLayer()
Return the layer involved in the change.

Returns:

getFromIndex

public int getFromIndex()
Returns the index of the first layer involved in the change

Returns:
The old index of the layer. -1 will be returned if the layer was not in the MapContext

getToIndex

public int getToIndex()
Returns the index of the last layer involved in the change

Returns:
The old index of the layer. -1 will be returned if the layer is no more in the MapContext

getMapLayerEvent

public MapLayerEvent getMapLayerEvent()
Returns the map layer event that originated this layer list event

Returns:
Value of property mapLayerEvent.


Copyright © 1996-2014 Geotools. All Rights Reserved.