de.fhpotsdam.unfolding.utils
Class DebugDisplay
java.lang.Object
de.fhpotsdam.unfolding.utils.DebugDisplay
- All Implemented Interfaces:
- MapEventListener, java.util.EventListener
public class DebugDisplay
- extends java.lang.Object
- implements MapEventListener
Displays various information about the map. Shows information about the current status of the map (e.g. zoom level),
the position of the mouse pointer (e.g. geo-location), and some general information (e.g. the map tile provider).
Constructor Summary |
DebugDisplay(processing.core.PApplet p,
UnfoldingMap map)
Shows current information on the mapDisplay and the mouse pointer. |
DebugDisplay(processing.core.PApplet p,
UnfoldingMap map,
EventDispatcher eventDispatcher,
float x,
float y)
Shows current information on the mapDisplay and the mouse pointer. |
DebugDisplay(processing.core.PApplet p,
UnfoldingMap map,
int x,
int y)
Shows current information on the mapDisplay and the mouse pointer. |
Method Summary |
void |
draw()
|
protected void |
drawEvent(float x,
float y,
float valueBoxSize,
int color)
|
protected void |
drawLabel(java.lang.String label,
float x,
float y)
|
protected void |
drawLabelEvent(java.lang.String label,
float listeningValue,
float broadcastingValue,
float x,
float y,
float valueBoxWidth)
|
protected void |
drawLabelValue(java.lang.String label,
java.lang.String value,
float x,
float y,
float valueBoxWidth)
|
protected void |
drawSeparator(float y)
|
protected void |
drawValue(java.lang.String value,
float x,
float y,
float valueBoxWidth)
|
protected void |
drawValue(java.lang.String value,
float x,
float y,
float valueBoxWidth,
boolean leftAlign)
|
protected void |
drawZoomBar(int zoomLevel,
float x,
float y,
int maxZoomLevel)
|
protected void |
fadeEventLights()
|
java.lang.String |
getId()
|
void |
onManipulation(MapEvent mapEvent)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WIDTH_DEFAULT
public static final float WIDTH_DEFAULT
- See Also:
- Constant Field Values
HEIGHT_DEFAULT
public static final float HEIGHT_DEFAULT
- See Also:
- Constant Field Values
MIN_TRANSPARENCY
public static final float MIN_TRANSPARENCY
- See Also:
- Constant Field Values
DebugDisplay
public DebugDisplay(processing.core.PApplet p,
UnfoldingMap map,
EventDispatcher eventDispatcher,
float x,
float y)
- Shows current information on the mapDisplay and the mouse pointer.
- Parameters:
p
- The PApplet, used to draw and to get mouse position.map
- The map to display debug information about.eventDispatcher
- The dispatcher to register this DebugDisplay to in order to display fired events.x
- Horizontal position of the display.y
- Vertical position of the display.
DebugDisplay
public DebugDisplay(processing.core.PApplet p,
UnfoldingMap map)
- Shows current information on the mapDisplay and the mouse pointer. Is positioned at top left corner.
- Parameters:
p
- The PApplet, used to draw and to get mouse position.map
- The map to display debug information about.
DebugDisplay
public DebugDisplay(processing.core.PApplet p,
UnfoldingMap map,
int x,
int y)
- Shows current information on the mapDisplay and the mouse pointer.
- Parameters:
p
- The PApplet, used to draw and to get mouse position.map
- The map to display debug information about.x
- Horizontal position of the display.y
- Vertical position of the display.
getId
public java.lang.String getId()
- Specified by:
getId
in interface MapEventListener
onManipulation
public void onManipulation(MapEvent mapEvent)
- Specified by:
onManipulation
in interface MapEventListener
draw
public void draw()
fadeEventLights
protected void fadeEventLights()
drawLabelEvent
protected void drawLabelEvent(java.lang.String label,
float listeningValue,
float broadcastingValue,
float x,
float y,
float valueBoxWidth)
drawEvent
protected void drawEvent(float x,
float y,
float valueBoxSize,
int color)
drawLabelValue
protected void drawLabelValue(java.lang.String label,
java.lang.String value,
float x,
float y,
float valueBoxWidth)
drawLabel
protected void drawLabel(java.lang.String label,
float x,
float y)
drawValue
protected void drawValue(java.lang.String value,
float x,
float y,
float valueBoxWidth)
drawValue
protected void drawValue(java.lang.String value,
float x,
float y,
float valueBoxWidth,
boolean leftAlign)
drawZoomBar
protected void drawZoomBar(int zoomLevel,
float x,
float y,
int maxZoomLevel)
drawSeparator
protected void drawSeparator(float y)