org.geotools.renderer.label
Class LabelIndex

Object
  extended by LabelIndex

public class LabelIndex
extends Object

Stores label items and helps in finding the interferering ones, either by pure overlap or within a certain distance from the specified bounds

Author:
Andrea Aime
Module:
modules/library/render (gt-render.jar)

Constructor Summary
LabelIndex()
           
 
Method Summary
 void addLabel(LabelCacheItem item, Rectangle2D bounds)
          Adds a label into the index
 boolean labelsWithinDistance(Rectangle2D bounds, double distance)
          Returns true if there is any label in the index within the specified distance from the bounds.
 void reserveArea(List<Rectangle2D> reserved)
          Reserve the area indicated by these Geometry.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelIndex

public LabelIndex()
Method Detail

labelsWithinDistance

public boolean labelsWithinDistance(Rectangle2D bounds,
                                    double distance)
Returns true if there is any label in the index within the specified distance from the bounds. For speed reasons the bounds will be simply expanded by the distance, no curved buffer will be generated

Parameters:
bounds -
distance -
Returns:

addLabel

public void addLabel(LabelCacheItem item,
                     Rectangle2D bounds)
Adds a label into the index

Parameters:
item -
bounds -

reserveArea

public void reserveArea(List<Rectangle2D> reserved)
Reserve the area indicated by these Geometry.

Parameters:
reserved -


Copyright © 1996-2010 Geotools. All Rights Reserved.