Package noaa.coastwatch.render
Class PoliticalOverlay
java.lang.Object
noaa.coastwatch.render.EarthDataOverlay
noaa.coastwatch.render.LineOverlay
noaa.coastwatch.render.PoliticalOverlay
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable
The
PoliticalOverlay
class annotates an
EarthDataView
with political border lines. Both
state borders and international borders may be selected but by
default, only international borders are rendered.- Since:
- 3.1.7
- Author:
- Peter Hollemans
- See Also:
-
Field Summary
Fields inherited from class noaa.coastwatch.render.LineOverlay
drawingShadow
Fields inherited from class noaa.coastwatch.render.EarthDataOverlay
alpha, lastTrans, prepared
-
Constructor Summary
ConstructorDescriptionPoliticalOverlay
(Color color) Creates a new political overlay with the specified color. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
draw
(Graphics2D g, EarthDataView view) Draws the overlay graphics.boolean
Gets the international borders flag.boolean
getState()
Gets the state borders flag.protected void
prepare
(Graphics2D g, EarthDataView view) Prepares the overlay graphics prior to drawing.void
setInternational
(boolean flag) Sets the international borders flag.void
setReaderFactory
(BinnedGSHHSReaderFactory factory) Sets the read factory for new border readers.void
setState
(boolean flag) Sets the state borders flag.Methods inherited from class noaa.coastwatch.render.LineOverlay
clip, drawShadow, getDropShadow, getShadowColor, getStroke, render, setDropShadow, setStroke
Methods inherited from class noaa.coastwatch.render.EarthDataOverlay
clone, compareTo, getAlphaVersion, getColor, getColors, getColorWithAlpha, getLayer, getMetadataAtPoint, getName, getTransparency, getVisible, hasMetadata, invalidate, isPrepared, needsPrepare, setColor, setLayer, setName, setTransparency, setVisible, toString
-
Constructor Details
-
PoliticalOverlay
Creates a new political overlay with the specified color. By default, only international borders are shown. The layer number is initialized to 0, and the stroke to the defaultBasicStroke
- Parameters:
color
- the overlay color.
-
-
Method Details
-
setReaderFactory
Sets the read factory for new border readers. -
getState
public boolean getState()Gets the state borders flag. -
setState
public void setState(boolean flag) Sets the state borders flag. By default, no state borders are drawn. -
getInternational
public boolean getInternational()Gets the international borders flag. -
setInternational
public void setInternational(boolean flag) Sets the international borders flag. By default, international borders are drawn. -
prepare
Description copied from class:EarthDataOverlay
Prepares the overlay graphics prior to drawing.- Specified by:
prepare
in classEarthDataOverlay
- Parameters:
g
- the graphics object for drawing.view
- the earth data view.
-
draw
Description copied from class:EarthDataOverlay
Draws the overlay graphics.- Specified by:
draw
in classEarthDataOverlay
- Parameters:
g
- the graphics object for drawing.view
- the earth data view.
-