public abstract class PolygonFeatureSource extends LineFeatureSource
PolygonFeatureSource
extends the
LineFeatureSource
class to render filled polygons as
well as lines. Polygon features are maintained in a separate list,
so that line features and polygon features may be rendered
independently.Modifier and Type | Field and Description |
---|---|
protected java.util.List |
polygonList
The currently selected list of polygon features.
|
area, featureList
Modifier | Constructor and Description |
---|---|
protected |
PolygonFeatureSource()
Creates a new source with an empty list of polygons.
|
Modifier and Type | Method and Description |
---|---|
java.util.Iterator |
polygonIterator()
Gets an iterator over the polygon features.
|
void |
renderOutlines(java.awt.Graphics2D g,
EarthImageTransform trans)
Renders the selected polygon data to a graphics context as just
the polygons outlines.
|
void |
renderPolygons(java.awt.Graphics2D g,
EarthImageTransform trans)
Renders the selected polygon data to a graphics context.
|
render
getArea, getAttributeCount, getAttributeNameMap, getAttributes, getFilter, iterator, select, select, setAttributes, setFilter
protected java.util.List polygonList
protected PolygonFeatureSource()
public java.util.Iterator polygonIterator()
public void renderPolygons(java.awt.Graphics2D g, EarthImageTransform trans)
LineFeatureSource.render(java.awt.Graphics2D, noaa.coastwatch.render.EarthImageTransform)
method in three ways:
GeneralPath
class
for details). This is done so that hierarchical levels of
polygons (polygons contained within other polygons) whose
winding orders are different are rendered correctly.g
- the graphics context for drawing.trans
- the earth image transform for converting Earth
locations to image points.public void renderOutlines(java.awt.Graphics2D g, EarthImageTransform trans)
g
- the graphics context for drawing.trans
- the earth image transform for converting Earth
locations to image points.