Class EarthPlotInfo

java.lang.Object
noaa.coastwatch.render.Legend
noaa.coastwatch.render.EarthPlotInfo

public class EarthPlotInfo extends Legend
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
  • 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

    • render

      public void render(Graphics2D g, int x, int y)
      Description copied from class: Legend
      Renders the legend at the specified coordinates in the graphics device.
      Specified by:
      render in class Legend
      Parameters:
      g - the graphics device for rendering.
      x - the x coordinate of the top-left corner.
      y - the y coordinate of the top-left corner.
    • getSize

      public Dimension getSize(Graphics2D g)
      Description copied from class: Legend
      Gets the actual required legend size.
      Specified by:
      getSize in class Legend
      Parameters:
      g - the graphics device that the legend will be rendered on.