de.fhpotsdam.unfolding.events
Class MapEvent

java.lang.Object
  extended by java.util.EventObject
      extended by de.fhpotsdam.unfolding.events.MapEvent
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PanMapEvent, ZoomMapEvent

public abstract class MapEvent
extends java.util.EventObject

A MapEvent stores various information about map events, and can be used to broadcast and listen to. The information consist of the event type (such as zoom, pan, etc), a sub-type (such as zoomBy, zoomTo, etc), and the necessary data to actually perform the map event (such as new zoom level value).

See sub classes for implementation details.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
MapEvent(java.lang.Object source, java.lang.String type, java.lang.String scopeId)
           
 
Method Summary
abstract  void executeManipulationFor(UnfoldingMap map)
           
 java.lang.String getScopeId()
          Gets the scope of this event.
 java.lang.String getSubType()
          Returns the sub type of this event.
 java.lang.String getType()
          Returns the type of this event.
 boolean isTweening()
           
 void setSubType(java.lang.String subType)
          Sets the sub type of this event.
 void setTweening(boolean tweening)
           
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapEvent

public MapEvent(java.lang.Object source,
                java.lang.String type,
                java.lang.String scopeId)
Method Detail

getType

public java.lang.String getType()
Returns the type of this event. NB This is not an Enum to allow simple extension.

Returns:
The id/name of this type.

getSubType

public java.lang.String getSubType()
Returns the sub type of this event.

Returns:
The name of this sub type.

setSubType

public void setSubType(java.lang.String subType)
Sets the sub type of this event.

Parameters:
subType - The name of this sub type.

getScopeId

public java.lang.String getScopeId()
Gets the scope of this event. See EventDispatcher.register(MapEventListener, String, String...).

Returns:
The ID of the scope.

setTweening

public void setTweening(boolean tweening)

isTweening

public boolean isTweening()

executeManipulationFor

public abstract void executeManipulationFor(UnfoldingMap map)