|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.util.PlacemarkClutterFilter
public class PlacemarkClutterFilter
Provides a clutter filter that rearranges PointPlacemark labels to avoid overlap. When placemarks overlap,
only their label and a line to their position are drawn. The placemark's icon is not drawn for overlapping
placemarks.
| Nested Class Summary | |
|---|---|
protected static class |
PlacemarkClutterFilter.DeclutteredLabel
|
| Field Summary | |
|---|---|
protected List<Rectangle2D> |
rectList
Holds the rectangles of the regions already drawn. |
protected Map<Rectangle2D,List<Declutterable>> |
shapeMap
Maintains a list of regions and the shapes associated with each region. |
| Constructor Summary | |
|---|---|
PlacemarkClutterFilter()
|
|
| Method Summary | |
|---|---|
protected void |
addShape(Rectangle2D rectangle,
Declutterable shape)
Adds a shape to the internal shape map. |
void |
apply(DrawContext dc,
List<Declutterable> shapes)
Applies the filter for a specified list of Declutterable shapes. |
protected void |
clear()
Release all the resources used in the most recent filter application. |
protected Rectangle2D |
intersects(Rectangle2D rectangle)
Indicates whether a specified region intersects a region in the filter. |
protected void |
render(DrawContext dc)
Draws the decluttered shape representation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected List<Rectangle2D> rectList
protected Map<Rectangle2D,List<Declutterable>> shapeMap
| Constructor Detail |
|---|
public PlacemarkClutterFilter()
| Method Detail |
|---|
protected void addShape(Rectangle2D rectangle,
Declutterable shape)
rectangle - the rectangle to associate the shape with.shape - the shape to associate with the specified rectangle.
public void apply(DrawContext dc,
List<Declutterable> shapes)
ClutterFilterDeclutterable shapes.
apply in interface ClutterFilterdc - the current draw context.shapes - the shapes to declutter.protected void clear()
protected Rectangle2D intersects(Rectangle2D rectangle)
rectangle - the region to test.
protected void render(DrawContext dc)
PointPlacemarks, the first non-
placemark shape is drawn in addition to the placemark representation. This causes this filter to produce the same
results for non-placemark shapes as does BasicClutterFilter.
dc - the current draw context.
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||