Package noaa.coastwatch.render
Class EarthPlotInfo
java.lang.Object
noaa.coastwatch.render.Legend
noaa.coastwatch.render.EarthPlotInfo
An earth plot information legend annotates an earth data view with
information about the data source, date, time, projection, and
earth location.
- Since:
- 3.1.1
- Author:
- Peter Hollemans
-
Field Summary
Fields inherited from class noaa.coastwatch.render.Legend
back, DEFAULT_STROKE, font, fore, preferredSize, SPACE_SIZE
-
Constructor Summary
ConstructorDescriptionEarthPlotInfo
(IconElement icon, EarthDataInfo info, EarthArea area, EarthContextElement context, EarthLocation center) Creates an earth plot information legend from the specified parameters.EarthPlotInfo
(IconElement icon, EarthDataInfo info, EarthArea area, EarthContextElement context, EarthLocation center, Dimension dim, Font font, Color fore, Color back) Creates an earth plot information legend from the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionGets the actual required legend size.void
render
(Graphics2D g, int x, int y) Renders the legend at the specified coordinates in the graphics device.Methods inherited from class noaa.coastwatch.render.Legend
setBackground, setFont, setForeground, setPreferredSize
-
Constructor Details
-
EarthPlotInfo
public EarthPlotInfo(IconElement icon, EarthDataInfo info, EarthArea area, EarthContextElement context, EarthLocation center) Creates an earth plot information legend from the specified parameters. The font is set to the default font face, plain style, 12 point, the preferred size to none, the foreground color is set to black, and the background color to none.- Parameters:
icon
- the icon element to use for the top of the legend.info
- the earth data information for text annotations.area
- the earth area for geographic bounds.context
- the earth context for the bottom of the legend, or null for no context element.
-
EarthPlotInfo
public EarthPlotInfo(IconElement icon, EarthDataInfo info, EarthArea area, EarthContextElement context, EarthLocation center, Dimension dim, Font font, Color fore, Color back) Creates an earth plot information legend from the specified parameters.- Parameters:
icon
- the icon element to use for the top of the legend.info
- the earth data information for text annotations.area
- the earth area for geographic bounds.context
- the earth context for the bottom of the legend, or null for no context element.center
- the earth location of the plot center.dim
- the preferred scale dimensions, or null for none.font
- the font for variable name, units, and scale values, or null for the default font face, plain style, 12 point.fore
- the foreground color for legend lines and annotations.back
- the background color, or null for none.
-
-
Method Details