Class LabeledLineOverlay

All Implemented Interfaces:
Serializable, Cloneable, Comparable
Direct Known Subclasses:
DataReferenceOverlay, LatLonOverlay

public abstract class LabeledLineOverlay extends LineOverlay
A LabeledLineOverlay renders lines and labels on an EarthDataView. A labeled line is any line that has a labeled value and some connected set of points to display such as a line of latitude/longitude or a data contour line.
Since:
3.2.2
Author:
Peter Hollemans
See Also:
  • Constructor Details

    • LabeledLineOverlay

      public LabeledLineOverlay(Color color, int layer, Stroke stroke, boolean drawLabels, Font font)
      Constructs a new labeled line overlay.
      Parameters:
      color - the overlay color.
      layer - the overlay layer number.
      stroke - the stroke to use for vector paths.
      drawLabels - the line labels flag, true if labels should be drawn.
      font - the line labels font. The labels font may be null if no labels are to be drawn.
    • LabeledLineOverlay

      public LabeledLineOverlay(Color color)
      Constructs a new labeled line overlay. The layer number is initialized to 0, the stroke to the default BasicStroke, labels to true, and the font to the default font face, plain style, 12 point.
      Parameters:
      color - the overlay color.
  • Method Details

    • getTextDropShadow

      public boolean getTextDropShadow()
      Gets the text drop shadow flag.
    • setTextDropShadow

      public void setTextDropShadow(boolean flag)
      Sets the text drop shadow flag. When text drop shadow mode is on, a shadow is drawn behind the text labels. By default, text drop shadow mode is on.
    • setDrawLabels

      public void setDrawLabels(boolean drawLabels)
      Sets the line labels flag.
    • getDrawLabels

      public boolean getDrawLabels()
      Gets the line labels flag.
    • setFont

      public void setFont(Font font)
      Sets the line labels font.
    • getFont

      public Font getFont()
      Gets the line labels font.
    • getLines

      protected abstract LineCollection getLines(EarthDataView view)
      Gets the collection of lines for this overlay. This method should be implemented by the subclass and is called by prepare(java.awt.Graphics2D, noaa.coastwatch.render.EarthDataView).
      Parameters:
      view - the earth view for line rendering.
      Returns:
      the collection of lines to render.
    • prepare

      protected void prepare(Graphics2D g, EarthDataView view)
      Description copied from class: EarthDataOverlay
      Prepares the overlay graphics prior to drawing.
      Specified by:
      prepare in class EarthDataOverlay
      Parameters:
      g - the graphics object for drawing.
      view - the earth data view.
    • draw

      protected void draw(Graphics2D g, EarthDataView view)
      Description copied from class: EarthDataOverlay
      Draws the overlay graphics.
      Specified by:
      draw in class EarthDataOverlay
      Parameters:
      g - the graphics object for drawing.
      view - the earth data view.