|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.squigle.layers.MetaDataHandler
MetaDataHandlers are used to keep a state of the metaData rendered by a layer, analyzing that data, and then performing some function based on that overall analysis. In most cases, they will be used to aggregate repeating street or landmark labels, analyze them in whole for the best position (angle, color, font, etc), and then finally to render the metadata overtop the geometry of the layer. MetaDataHandler's evaluate functions are called by the layers rendering loop as the layer draws the base geometry. The process function is called as the last step in a layers rendering process. It takes an object as a parameter, which is normally the Graphics object passed from the layer paint function, though it could be any object that has data that needs to be accessed or manipulated in the process stage.
As the base class, MetaDataHandler has null functionality. It will ignore all metadata evaluated and do nothing for the process step.
| Constructor Summary | |
MetaDataHandler()
|
|
| Method Summary | |
void |
evaluateLine(float[][] pl,
java.lang.String[] metaData)
override to store polyline data and a pointer to its metaData for later evaluation |
void |
evaluatePoint(float[] p,
java.lang.String[] metaDataPointer)
override to store point data and a pointer to its metaData for later evaluation |
void |
evaluatePolygon(float[] pg,
int metaDataPointer)
override to store polygon data and a pointer to its metaData for later evaluation |
void |
process(java.lang.Object o)
process the collected data |
void |
reset()
clear the previous state from before evaluating the next frame |
void |
setLayer(org.squigle.layers.Layer layer)
Stores a refrence to the layer this handler was registered to. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MetaDataHandler()
| Method Detail |
public void setLayer(org.squigle.layers.Layer layer)
layer - the parent layer
public void evaluatePoint(float[] p,
java.lang.String[] metaDataPointer)
p - point to be evaluatedmetaDataPointer - the offset in the layers metaData ByteBuffer for this point
public void evaluateLine(float[][] pl,
java.lang.String[] metaData)
pl - polyline to be evaluated
public void evaluatePolygon(float[] pg,
int metaDataPointer)
pg - polygon to be evaluatedmetaDataPointer - the offset in the layers metaData ByteBuffer for this polygonpublic void process(java.lang.Object o)
o - an external object to be used by the process stagepublic void reset()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||