|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.fhpotsdam.unfolding.mapdisplay.AbstractMapDisplay
de.fhpotsdam.unfolding.mapdisplay.Java2DMapDisplay
public class Java2DMapDisplay
The internal MapDisplay to handle the map display in Processing 2D (and used as super class for 3D)
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class de.fhpotsdam.unfolding.mapdisplay.AbstractMapDisplay |
|---|
AbstractMapDisplay.QueueSorter, AbstractMapDisplay.ZoomComparator |
| Field Summary | |
|---|---|
protected java.lang.Integer |
bgColor
|
protected processing.core.PMatrix3D |
innerMatrix
The inner transformation matrix. |
static org.apache.log4j.Logger |
log
|
protected processing.core.PMatrix3D |
matrix
The outer transformation matrix. |
processing.core.PApplet |
papplet
|
| Fields inherited from class de.fhpotsdam.unfolding.mapdisplay.AbstractMapDisplay |
|---|
allTilesLoaded, angle, grid_padding, height, images, innerAngle, innerOffsetX, innerOffsetY, innerScale, innerTransformationCenter, markerManagerList, max_images_to_keep, max_pending, offsetX, offsetY, pending, provider, queue, queueSorter, recent_images, scale, TILE_HEIGHT, TILE_WIDTH, transformationCenter, width, zoomComparator |
| Fields inherited from interface processing.core.PConstants |
|---|
ADD, ALPHA, ALT, AMBIENT, ARC, ARGB, ARROW, BACKSPACE, BASELINE, BEVEL, BEZIER_VERTEX, BLEND, BLUR, BOTTOM, BOX, BREAK, BURN, CENTER, CHATTER, CHORD, CLAMP, CLOSE, CODED, COMPLAINT, CONTROL, CORNER, CORNERS, CROSS, CURVE_VERTEX, CUSTOM, DARKEST, DEG_TO_RAD, DELETE, DIAMETER, DIFFERENCE, DILATE, DIRECTIONAL, DISABLE_DEPTH_MASK, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_NATIVE_FONTS, DISABLE_OPENGL_ERRORS, DISABLE_OPTIMIZED_STROKE, DISABLE_RETINA_PIXELS, DISABLE_STROKE_PERSPECTIVE, DISABLE_STROKE_PURE, DISABLE_TEXTURE_MIPMAPS, DODGE, DOWN, DXF, ELLIPSE, ENABLE_DEPTH_MASK, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_ERRORS, ENABLE_OPTIMIZED_STROKE, ENABLE_RETINA_PIXELS, ENABLE_STROKE_PERSPECTIVE, ENABLE_STROKE_PURE, ENABLE_TEXTURE_MIPMAPS, ENTER, EPSILON, ERODE, ERROR_BACKGROUND_IMAGE_FORMAT, ERROR_BACKGROUND_IMAGE_SIZE, ERROR_PUSHMATRIX_OVERFLOW, ERROR_PUSHMATRIX_UNDERFLOW, ERROR_TEXTFONT_NULL_PFONT, ESC, EXCLUSION, GIF, GRAY, GROUP, HALF_PI, HAND, HARD_LIGHT, HINT_COUNT, HSB, IMAGE, INVERT, JAVA2D, JPEG, LANDSCAPE, LEFT, LIGHTEST, LINE, LINE_LOOP, LINE_STRIP, LINES, LINUX, MACOSX, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MITER, MODEL, MODELVIEW, MOVE, MULTIPLY, NORMAL, OPAQUE, OPEN, OPENGL, ORTHOGRAPHIC, OTHER, OVERLAY, P2D, P3D, PATH, PDF, PERSPECTIVE, PI, PIE, platformNames, POINT, POINTS, POLYGON, PORTRAIT, POSTERIZE, PROBLEM, PROJECT, PROJECTION, QUAD, QUAD_BEZIER_VERTEX, QUAD_STRIP, QUADRATIC_VERTEX, QUADS, QUARTER_PI, RAD_TO_DEG, RADIUS, RECT, REPEAT, REPLACE, RETURN, RGB, RIGHT, ROUND, SCREEN, SHAPE, SHIFT, SOFT_LIGHT, SPHERE, SPOT, SQUARE, SUBTRACT, TAB, TARGA, TAU, TEXT, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TWO_PI, UP, VERTEX, WAIT, WHITESPACE, WINDOWS, X, Y, Z |
| Constructor Summary | |
|---|---|
Java2DMapDisplay(processing.core.PApplet papplet,
AbstractMapProvider provider)
Creates a new MapDisplay with full canvas size, and given provider |
|
Java2DMapDisplay(processing.core.PApplet papplet,
AbstractMapProvider provider,
float offsetX,
float offsetY,
float width,
float height)
Creates a new MapDisplay. |
|
| Method Summary | |
|---|---|
void |
calculateInnerMatrix()
|
void |
calculateMatrix()
Updates the matrix to transform the map with. |
protected TileLoader |
createTileLoader(Coordinate coord)
|
void |
draw()
Draws the on the PGraphics canvas. |
float[] |
getInnerObject(ScreenPosition screenPosition)
|
float[] |
getInnerObjectFromLocation(Location location)
|
float[] |
getInnerObjectFromObjectPosition(float x,
float y)
|
float[] |
getInnerObjectFromScreenPosition(float x,
float y)
Deprecated. |
processing.core.PGraphics |
getInnerPG()
|
Location |
getLocation(float x,
float y)
|
Location |
getLocation(ScreenPosition screenPosition)
|
Location |
getLocationFromInnerObjectPosition(float x,
float y)
|
Location |
getLocationFromObjectPosition(float x,
float y)
|
Location |
getLocationFromScreenPosition(float x,
float y)
Deprecated. |
float[] |
getObjectFromInnerObjectPosition(float x,
float y)
|
float[] |
getObjectFromLocation(Location location)
|
float[] |
getObjectFromScreenPosition(float x,
float y)
|
processing.core.PGraphics |
getOuterPG()
|
float[] |
getScreenFromInnerObjectPosition(float x,
float y)
|
float[] |
getScreenFromObjectPosition(float x,
float y)
|
ScreenPosition |
getScreenPosition(Location location)
|
float[] |
getScreenPositionFromLocation(Location location)
Deprecated. |
protected float[] |
getTransformedPosition(float x,
float y,
boolean inverse)
Calculates offset and rotation for screen canvas position, to be used with the internal transformation matrix. |
protected java.util.Vector |
getVisibleKeys(processing.core.PGraphics pg)
|
protected void |
postDraw()
Is called last in draw(). |
void |
setBackgroundColor(java.lang.Integer color)
Sets background color of map. |
void |
tilesLoaded()
Gets called if all tiles have been loaded. |
| Methods inherited from class de.fhpotsdam.unfolding.mapdisplay.AbstractMapDisplay |
|---|
addMarker, addMarkerManager, addMarkers, allTilesLoaded, cleanupImageBuffer, cleanupImageBuffer, createDefaultMarkerManager, getDefaultMarkerManager, getHeight, getInnerTransformationCenter, getLastMarkerManager, getMapProvider, getMarkerManager, getMarkerManager, getMarkerManagerList, getMask, getTransformationCenter, getWidth, grabTile, processQueue, removeMarkerManager, removeMarkerManager, resize, setInnerTransformationCenter, setMapProvider, setProvider, setTransformationCenter, tileLoaded |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static org.apache.log4j.Logger log
public processing.core.PApplet papplet
protected processing.core.PMatrix3D innerMatrix
protected processing.core.PMatrix3D matrix
protected java.lang.Integer bgColor
| Constructor Detail |
|---|
public Java2DMapDisplay(processing.core.PApplet papplet,
AbstractMapProvider provider)
public Java2DMapDisplay(processing.core.PApplet papplet,
AbstractMapProvider provider,
float offsetX,
float offsetY,
float width,
float height)
| Method Detail |
|---|
public void tilesLoaded()
tilesLoaded in class AbstractMapDisplaypublic void calculateMatrix()
calculateMatrix in class AbstractMapDisplaypublic void calculateInnerMatrix()
calculateInnerMatrix in class AbstractMapDisplay
public float[] getObjectFromScreenPosition(float x,
float y)
getObjectFromScreenPosition in class AbstractMapDisplay
public float[] getScreenFromObjectPosition(float x,
float y)
getScreenFromObjectPosition in class AbstractMapDisplay
protected float[] getTransformedPosition(float x,
float y,
boolean inverse)
AbstractMapDisplay
getTransformedPosition in class AbstractMapDisplayx - Cartesian x coordinate.y - Cartesian y coordinate.inverse - Indicates back and forward matrix calculation. Inverse is used for point2location, non-inverse for
location2point.
public float[] getObjectFromInnerObjectPosition(float x,
float y)
getObjectFromInnerObjectPosition in class AbstractMapDisplay
public float[] getInnerObjectFromObjectPosition(float x,
float y)
getInnerObjectFromObjectPosition in class AbstractMapDisplay
public float[] getScreenFromInnerObjectPosition(float x,
float y)
getScreenFromInnerObjectPosition in class AbstractMapDisplay
@Deprecated
public float[] getInnerObjectFromScreenPosition(float x,
float y)
getInnerObjectFromScreenPosition in class AbstractMapDisplaypublic float[] getInnerObject(ScreenPosition screenPosition)
getInnerObject in class AbstractMapDisplaypublic float[] getObjectFromLocation(Location location)
getObjectFromLocation in class AbstractMapDisplay
public Location getLocationFromInnerObjectPosition(float x,
float y)
getLocationFromInnerObjectPosition in class AbstractMapDisplay
@Deprecated
public Location getLocationFromScreenPosition(float x,
float y)
getLocationFromScreenPosition in class AbstractMapDisplay
public Location getLocation(float x,
float y)
getLocation in class AbstractMapDisplaypublic Location getLocation(ScreenPosition screenPosition)
getLocation in class AbstractMapDisplay
public Location getLocationFromObjectPosition(float x,
float y)
getLocationFromObjectPosition in class AbstractMapDisplaypublic float[] getInnerObjectFromLocation(Location location)
getInnerObjectFromLocation in class AbstractMapDisplaypublic ScreenPosition getScreenPosition(Location location)
getScreenPosition in class AbstractMapDisplay@Deprecated public float[] getScreenPositionFromLocation(Location location)
getScreenPositionFromLocation in class AbstractMapDisplaypublic processing.core.PGraphics getInnerPG()
getInnerPG in class AbstractMapDisplaypublic processing.core.PGraphics getOuterPG()
getOuterPG in class AbstractMapDisplayprotected void postDraw()
draw(). May be implemented in sub-classes to handle drawing on outerPG.
public void draw()
draw in class AbstractMapDisplaypublic void setBackgroundColor(java.lang.Integer color)
setBackgroundColor in class AbstractMapDisplaycolor - Color for the background canvas. Can be semi-transparent. If null it is not used.protected java.util.Vector getVisibleKeys(processing.core.PGraphics pg)
protected TileLoader createTileLoader(Coordinate coord)
createTileLoader in class AbstractMapDisplay
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||