public class SynchronizedLabelCache extends Object implements LabelCache
| Constructor and Description | 
|---|
| SynchronizedLabelCache() | 
| SynchronizedLabelCache(LabelCache cache) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | clear()Clears the cache completely | 
| void | clear(String layerId)Clears the cache of all information relating to the layer identified. | 
| void | disableLayer(String layerId)Leaves the label information in the cache but ignores it when calculating what labels are
 drawn. | 
| void | enableLayer(String layerId)Enable a layer after being disabled. | 
| void | end(Graphics2D graphics,
   Rectangle displayArea)Called to indicate that the map is done rendering. | 
| void | endLayer(String layerId,
        Graphics2D graphics,
        Rectangle displayArea)Called to indicate that a layer is done rendering. | 
| List | orderedLabels()Return a list with all the values in priority order. | 
| void | put(Rectangle2D area)Reserve the provided geometry prior to sorting out where labels can go. | 
| void | put(String layerId,
   TextSymbolizer symbolizer,
   Feature feature,
   LiteShape2 shape,
   NumberRange<Double> scaleRange)Puts a Label in the cache. | 
| void | start()Called by renderer to indicate that the rendering process is starting. | 
| void | startLayer(String layerId)Called by renderer to indication the start of rendering a layer. | 
| void | stop()Tells the cache to stop labelling. | 
public SynchronizedLabelCache()
public SynchronizedLabelCache(LabelCache cache)
public void start()
LabelCachestart in interface LabelCachepublic void clear()
LabelCacheclear in interface LabelCachepublic void clear(String layerId)
LabelCacheclear in interface LabelCachelayerId - id of the layerpublic void enableLayer(String layerId)
LabelCacheenableLayer in interface LabelCachelayerId - layer to activate.public void end(Graphics2D graphics, Rectangle displayArea)
LabelCacheend in interface LabelCachegraphics - the graphics to draw on.displayArea - The size of the display area.public void endLayer(String layerId, Graphics2D graphics, Rectangle displayArea)
LabelCacheendLayer in interface LabelCachelayerId - an id for the layergraphics - the graphics to draw on.displayArea - The size of the display areapublic void put(String layerId, TextSymbolizer symbolizer, Feature feature, LiteShape2 shape, NumberRange<Double> scaleRange)
LabelCacheput in interface LabelCachelayerId - 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 legalpublic void put(Rectangle2D area)
LabelCacheThis facility is used to reserve an area so that labels do not end up overlapping on screen constructs like scalebars or north arrows etc...
put in interface LabelCachepublic void startLayer(String layerId)
LabelCachestartLayer in interface LabelCachelayerId - an id for the layerpublic void stop()
LabelCachestop in interface LabelCachepublic void disableLayer(String layerId)
LabelCachedisableLayer in interface LabelCachelayerId - id of the layer to disable.public List orderedLabels()
LabelCacheorderedLabels in interface LabelCacheCopyright © 1996–2019 Geotools. All rights reserved.