Package org.geotools.renderer.lite
Class SynchronizedLabelCache
Object
SynchronizedLabelCache
- All Implemented Interfaces:
LabelCache
Allow multiple thread to modify LabelCache.
- Author:
- Jesse
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the cache completelyvoidClears the cache of all information relating to the layer identified.voiddisableLayer(String layerId) Leaves the label information in the cache but ignores it when calculating what labels are drawn.voidenableLayer(String layerId) Enable a layer after being disabled.voidend(Graphics2D graphics, Rectangle displayArea) Called to indicate that the map is done rendering.voidendLayer(String layerId, Graphics2D graphics, Rectangle displayArea) Called to indicate that a layer is done rendering.Return a list with all the values in priority order.voidput(Rectangle2D area) Reserve the provided geometry prior to sorting out where labels can go.voidput(String layerId, TextSymbolizer symbolizer, Feature feature, LiteShape2 shape, NumberRange<Double> scaleRange) Puts a Label in the cache.voidstart()Called by renderer to indicate that the rendering process is starting.voidstartLayer(String layerId) Called by renderer to indication the start of rendering a layer.voidstop()Tells the cache to stop labelling.
-
Constructor Details
-
SynchronizedLabelCache
public SynchronizedLabelCache() -
SynchronizedLabelCache
-
-
Method Details
-
start
public void start()Description copied from interface:LabelCacheCalled by renderer to indicate that the rendering process is starting.- Specified by:
startin interfaceLabelCache
-
clear
public void clear()Description copied from interface:LabelCacheClears the cache completely- Specified by:
clearin interfaceLabelCache
-
clear
Description copied from interface:LabelCacheClears the cache of all information relating to the layer identified.- Specified by:
clearin interfaceLabelCache- Parameters:
layerId- id of the layer
-
enableLayer
Description copied from interface:LabelCacheEnable a layer after being disabled. If startLayer is called this does not need to be called as start layer implicitely activates the layer.- Specified by:
enableLayerin interfaceLabelCache- Parameters:
layerId- layer to activate.
-
end
Description copied from interface:LabelCacheCalled to indicate that the map is done rendering. The method may draw labels if appropriate for the labeling algorithm- Specified by:
endin interfaceLabelCache- Parameters:
graphics- the graphics to draw on.displayArea- The size of the display area.
-
endLayer
Description copied from interface:LabelCacheCalled to indicate that a layer is done rendering. The method may draw labels if appropriate for the labeling algorithm- Specified by:
endLayerin interfaceLabelCache- Parameters:
layerId- an id for the layergraphics- the graphics to draw on.displayArea- The size of the display area
-
put
public void put(String layerId, TextSymbolizer symbolizer, Feature feature, LiteShape2 shape, NumberRange<Double> scaleRange) Description copied from interface:LabelCachePuts a Label in the cache.- Specified by:
putin interfaceLabelCache- Parameters:
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 legal
-
put
Description copied from interface:LabelCacheReserve the provided geometry prior to sorting out where labels can go.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...
- Specified by:
putin interfaceLabelCache- Parameters:
area- The Area of the screen to reserve (in screen coordinates)
-
startLayer
Description copied from interface:LabelCacheCalled by renderer to indication the start of rendering a layer. Will add the layer to the set of active layers.- Specified by:
startLayerin interfaceLabelCache- Parameters:
layerId- an id for the layer
-
stop
public void stop()Description copied from interface:LabelCacheTells the cache to stop labelling.- Specified by:
stopin interfaceLabelCache
-
disableLayer
Description copied from interface:LabelCacheLeaves the label information in the cache but ignores it when calculating what labels are drawn.- Specified by:
disableLayerin interfaceLabelCache- Parameters:
layerId- id of the layer to disable.
-
orderedLabels
Description copied from interface:LabelCacheReturn a list with all the values in priority order. Both grouped and non-grouped- Specified by:
orderedLabelsin interfaceLabelCache- Returns:
- list with all values in priority order
-