|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LabelCache
Used to cache labels prior to their being drawn on the screen.
Implementations exisit with different trade offs about what labels can fit where.
Method Summary | |
---|---|
void |
clear()
Clears the cache completely |
void |
clear(java.lang.String layerId)
Clears the cache of all information relating to the layer identified. |
void |
disableLayer(java.lang.String layerId)
Leaves the label information in the cache but ignores it when calculating what labels are drawn. |
void |
enableLayer(java.lang.String layerId)
Enable a layer after being disabled. |
void |
end(java.awt.Graphics2D graphics,
java.awt.Rectangle displayArea)
Called to indicate that the map is done rendering. |
void |
endLayer(java.lang.String layerId,
java.awt.Graphics2D graphics,
java.awt.Rectangle displayArea)
Called to indicate that a layer is done rendering. |
java.util.List |
orderedLabels()
Return a list with all the values in priority order. |
void |
put(java.awt.geom.Rectangle2D geometry)
Reserve the provided geometry prior to sorting out where labels can go. |
void |
put(java.lang.String layerId,
TextSymbolizer symbolizer,
org.opengis.feature.simple.SimpleFeature feature,
LiteShape2 shape,
NumberRange<java.lang.Double> scaleRange)
Puts a Label in the cache. |
void |
start()
Called by renderer to indicate that the rendering process is starting. |
void |
startLayer(java.lang.String layerId)
Called by renderer to indication the start of rendering a layer. |
void |
stop()
Tells the cache to stop labelling. |
Method Detail |
---|
void start()
void startLayer(java.lang.String layerId)
layerId
- an id for the layervoid put(java.lang.String layerId, TextSymbolizer symbolizer, org.opengis.feature.simple.SimpleFeature feature, LiteShape2 shape, NumberRange<java.lang.Double> scaleRange)
layerId
- id indicating the layer the feature is part ofsymbolizer
- The symbolizer containing the style informationfeature
- the feature that has the information required for the symbolizer to
calculate the required render information.shape
- the shape to be labeled. This is in screen coordinates.scaleRange
- the scaleRange that the symbolizer is legalvoid put(java.awt.geom.Rectangle2D geometry)
This facility is used to reserve an area so that labels do not end up overlapping on screen constructs like scalebars or north arrows etc...
Geometry
- The Area of the screen to reserve (in screen coordinates)void endLayer(java.lang.String layerId, java.awt.Graphics2D graphics, java.awt.Rectangle displayArea)
graphics
- the graphics to draw on.displayArea
- The size of the display arealayerId
- an id for the layervoid end(java.awt.Graphics2D graphics, java.awt.Rectangle displayArea)
graphics
- the graphics to draw on.displayArea
- The size of the display area.void stop()
void clear()
void clear(java.lang.String layerId)
layerId
- id of the layervoid disableLayer(java.lang.String layerId)
layerId
- id of the layer to disable.void enableLayer(java.lang.String layerId)
layerId
- layer to activate.java.util.List orderedLabels()
labelCache
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |