twaver.gis.event
Class MapLayerChangedEvent

java.lang.Object
  extended bytwaver.gis.event.MapLayerChangedEvent

public class MapLayerChangedEvent
extends java.lang.Object

An event which indicates that some changes about the layer occurs.

This event is fired by a GeographyMap when some layer stored in it is added into, or moved upwards, or moved downwards ,or removed , and so on.


Field Summary
static int LAYERCHANGED_TYPE_ADD
          Constant specifies a layer is added into a map.
static int LAYERCHANGED_TYPE_MOVE
          Constant specifies a layer is moved upwards or downwards in a map.
static int LAYERCHANGED_TYPE_REMOVE
          Constant specifies a layer is removed from a map.
static int LAYERCHANGED_TYPE_REMOVEALLLAYERS
          Constant specifies all the layers stored in the map are removed.
static int LAYERCHANGED_TYPE_REMOVEMUTILLAYERS
          Constant specifies a lot of layers are removed.
static int LAYERCHANGED_TYPE_STYLE
          Constant specifies the style of a layer is changed.
static int LAYERCHANGED_TYPE_VISIBLE
          Constant specifies a layer is changed to be visible or invisible in a map.
 
Constructor Summary
MapLayerChangedEvent(java.lang.String[] layerName, int eventType)
           
MapLayerChangedEvent(java.lang.String[] layerName, int eventType, boolean actRightNow)
           
MapLayerChangedEvent(java.lang.String layerName, int eventType)
          Constructs a MapLayerChangedEvent object with the specified type and layer name.
MapLayerChangedEvent(java.lang.String layerName, int eventType, boolean actRightNow)
           
 
Method Summary
 int getEventType()
          Returns the event type.
 java.lang.String getEventTypeDescription()
          Returns a parameter string identifying this event.
 java.lang.String getLayerName()
          Gets the name of the source on which the event initially occurred.
 java.lang.String[] getLayersName()
           
 boolean isActRightNow()
           
 void setLayerName(java.lang.String layerName)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LAYERCHANGED_TYPE_ADD

public static final int LAYERCHANGED_TYPE_ADD
Constant specifies a layer is added into a map.

See Also:
Constant Field Values

LAYERCHANGED_TYPE_MOVE

public static final int LAYERCHANGED_TYPE_MOVE
Constant specifies a layer is moved upwards or downwards in a map.

See Also:
Constant Field Values

LAYERCHANGED_TYPE_REMOVE

public static final int LAYERCHANGED_TYPE_REMOVE
Constant specifies a layer is removed from a map.

See Also:
Constant Field Values

LAYERCHANGED_TYPE_REMOVEALLLAYERS

public static final int LAYERCHANGED_TYPE_REMOVEALLLAYERS
Constant specifies all the layers stored in the map are removed.

See Also:
Constant Field Values

LAYERCHANGED_TYPE_REMOVEMUTILLAYERS

public static final int LAYERCHANGED_TYPE_REMOVEMUTILLAYERS
Constant specifies a lot of layers are removed.

See Also:
Constant Field Values

LAYERCHANGED_TYPE_STYLE

public static final int LAYERCHANGED_TYPE_STYLE
Constant specifies the style of a layer is changed.

See Also:
Constant Field Values

LAYERCHANGED_TYPE_VISIBLE

public static final int LAYERCHANGED_TYPE_VISIBLE
Constant specifies a layer is changed to be visible or invisible in a map.

See Also:
Constant Field Values
Constructor Detail

MapLayerChangedEvent

public MapLayerChangedEvent(java.lang.String[] layerName,
                            int eventType)

MapLayerChangedEvent

public MapLayerChangedEvent(java.lang.String[] layerName,
                            int eventType,
                            boolean actRightNow)

MapLayerChangedEvent

public MapLayerChangedEvent(java.lang.String layerName,
                            int eventType)
Constructs a MapLayerChangedEvent object with the specified type and layer name.

Parameters:
layerName - the name of the layer which has some change.
eventType - the type of the event. The type should be one of the follows:
See Also:
LAYERCHANGED_TYPE_ADD, LAYERCHANGED_TYPE_MOVE, LAYERCHANGED_TYPE_REMOVE, LAYERCHANGED_TYPE_VISIBLE, LAYERCHANGED_TYPE_STYLE, LAYERCHANGED_TYPE_REMOVEALLLAYERS, LAYERCHANGED_TYPE_REMOVEMUTILLAYERS

MapLayerChangedEvent

public MapLayerChangedEvent(java.lang.String layerName,
                            int eventType,
                            boolean actRightNow)
Method Detail

getEventType

public int getEventType()
Returns the event type.

Returns:
an integer identifying the type of event.

getEventTypeDescription

public java.lang.String getEventTypeDescription()
Returns a parameter string identifying this event. This method is useful for event-logging and for debugging.

Returns:
a string identifying the event.

getLayerName

public java.lang.String getLayerName()
Gets the name of the source on which the event initially occurred.

Returns:
a string

getLayersName

public java.lang.String[] getLayersName()

isActRightNow

public boolean isActRightNow()

setLayerName

public void setLayerName(java.lang.String layerName)