de.fhpotsdam.unfolding.utils
Class MapUtils

java.lang.Object
  extended by de.fhpotsdam.unfolding.utils.MapUtils

public class MapUtils
extends java.lang.Object

Utility and convenience methods for simplifying map usage.


Constructor Summary
MapUtils()
           
 
Method Summary
static EventDispatcher createDefaultEventDispatcher(processing.core.PApplet p, java.util.List<UnfoldingMap> maps)
          Initializes default events, i.e.
static EventDispatcher createDefaultEventDispatcher(processing.core.PApplet p, UnfoldingMap... maps)
          Initializes default events, i.e.
static EventDispatcher createMouseEventDispatcher(processing.core.PApplet p, UnfoldingMap... maps)
          Initializes default events, i.e.
static java.util.List<Marker> createSimpleMarkers(java.util.List<Feature> features)
          Creates Unfolding's simple markers from features.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapUtils

public MapUtils()
Method Detail

createDefaultEventDispatcher

public static EventDispatcher createDefaultEventDispatcher(processing.core.PApplet p,
                                                           UnfoldingMap... maps)
Initializes default events, i.e. all given maps handle mouse and keyboard interactions. No cross-listening between maps.

Parameters:
p - The PApplet needed for mouse and key user interactions.
maps - One or many maps.
Returns:
The EventDispatcher to use for additional event handling.

createMouseEventDispatcher

public static EventDispatcher createMouseEventDispatcher(processing.core.PApplet p,
                                                         UnfoldingMap... maps)
Initializes default events, i.e. all given maps handle mouse interactions. No cross-listening between maps.

Parameters:
p - The PApplet needed for mouse user interactions.
maps - One or many maps.
Returns:
The EventDispatcher to use for additional event handling.

createDefaultEventDispatcher

public static EventDispatcher createDefaultEventDispatcher(processing.core.PApplet p,
                                                           java.util.List<UnfoldingMap> maps)
Initializes default events, i.e. all given maps handle mouse and keyboard interactions. No cross-listening between maps.

Parameters:
p - The PApplet needed for mouse and key user interactions.
maps - One or many maps.
Returns:
The EventDispatcher to use for additional event handling.

createSimpleMarkers

public static java.util.List<Marker> createSimpleMarkers(java.util.List<Feature> features)
Creates Unfolding's simple markers from features. (without the need to create a MarkerFactory)

Parameters:
features - The features to get markers for.
Returns:
A list of markers.