| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.fhpotsdam.unfolding.marker.MarkerManager<E>
public class MarkerManager<E extends Marker>
Manages markers of different types. Is always connected to one map (for location to screen coordinate conversion).
| Field Summary | |
|---|---|
| protected  boolean | bEnableDrawing | 
| protected  UnfoldingMap | map | 
| protected  java.util.List<E> | markers | 
| Constructor Summary | |
|---|---|
| MarkerManager()Creates a MarkerManager with an empty markers list. | |
| MarkerManager(java.util.List<E> markers)Creates a MarkerManager with given markers. | |
| Method Summary | |
|---|---|
|  boolean | addMarker(E marker)Adds a marker to the manager marker list. | 
|  void | addMarkers(java.util.List<E> markers)Adds a list of markers to the managed markers. | 
|  void | clearMarkers()Removes all markers. | 
|  void | disableDrawing() | 
|  void | draw()Internal method to draw all managed markers. | 
|  void | enableDrawing() | 
|  E | getFirstHitMarker(float checkX,
                  float checkY)Returns the first marker which the given screen coordinates hit. | 
|  java.util.List<E> | getHitMarkers(float checkX,
              float checkY)Returns all hit markers. | 
|  java.util.List<E> | getMarkers()Returns all markers managed by this MarkerManager. | 
|  E | getNearestMarker(float checkX,
                 float checkY)Returns the nearest marker to the given screen coordinates. | 
|  boolean | isDrawingEnabled() | 
|  Marker | isInside(float checkX,
         float checkY)Deprecated. Replaced by getFirstHitMarker(float, float) | 
|  boolean | removeMarker(E marker)Removes a marker from the managed markers. | 
|  void | setMap(UnfoldingMap map)Set the map to use for conversion of geo-locations to screen positions for the markers. | 
|  void | setMarkers(java.util.List<E> markers)Sets the markers to manage. | 
|  void | toggleDrawing()Toggles whether this marker manager draws all markers or none. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected UnfoldingMap map
protected java.util.List<E extends Marker> markers
protected boolean bEnableDrawing
| Constructor Detail | 
|---|
public MarkerManager()
public MarkerManager(java.util.List<E> markers)
markers - The markers to add.| Method Detail | 
|---|
public void setMap(UnfoldingMap map)
map - The map.public void setMarkers(java.util.List<E> markers)
markers - A list of markers. If null all existing markers will be removed.public boolean removeMarker(E marker)
marker - The marker to remove.
public void clearMarkers()
public boolean isDrawingEnabled()
public void enableDrawing()
public void disableDrawing()
public void toggleDrawing()
public boolean addMarker(E marker)
marker - The marker to add.
public void addMarkers(java.util.List<E> markers)
markers - A list of markers.public java.util.List<E> getMarkers()
@Deprecated
public Marker isInside(float checkX,
                                  float checkY)
getFirstHitMarker(float, float)
public E getNearestMarker(float checkX,
                          float checkY)
checkX - The x position to check.checkY - The y position to check.
public E getFirstHitMarker(float checkX,
                           float checkY)
checkX - The x position to check.checkY - The y position to check.
public java.util.List<E> getHitMarkers(float checkX,
                                       float checkY)
checkX - The x position to check.checkY - The y position to check.
public void draw()
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||