Class CloudCoverageSymbol

All Implemented Interfaces:
Cloneable

public class CloudCoverageSymbol extends MetSymbol
Cloud coverage meteorological symbols.
Version:
$Revision: 1.17 $
Author:
Metapps development team
  • Constructor Details

    • CloudCoverageSymbol

      public CloudCoverageSymbol()
      Default constructor
    • CloudCoverageSymbol

      public CloudCoverageSymbol(int x, int y)
      Create a cloud coverage symbol at the x and y position. Position is relative to the center point. Use default parameter and description.
      Parameters:
      x - x offset from center
      y - y offset from center
    • CloudCoverageSymbol

      public CloudCoverageSymbol(DisplayCanvas canvas, int x, int y)
      Create a cloud coverage symbol at the x and y position on the supplied canvas. Position is relative to the center point. Use default parameter and description.
      Parameters:
      canvas - DisplayCanvas to draw on
      x - x offset from center
      y - y offset from center
    • CloudCoverageSymbol

      public CloudCoverageSymbol(int x, int y, String param, String paramDesc)
      Create a cloud coverage symbol at the x and y position. Position is relative to the center point. Use parameter and description provided.
      Parameters:
      x - x offset from center
      y - y offset from center
      param - parameter name for this CloudCoverageSymbol
      paramDesc - description (long name) of param
    • CloudCoverageSymbol

      public CloudCoverageSymbol(DisplayCanvas canvas, int x, int y, String param, String paramDesc)
      Create a cloud coverage symbol at the x and y position on the DisplayCanvas supplied. Position is relative to the center point. Use parameter and description provided.
      Parameters:
      canvas - DisplayCanvas to draw on
      x - x offset from center
      y - y offset from center
      param - parameter name for this CloudCoverageSymbol
      paramDesc - description (long name) of param
  • Method Details

    • getStretchy

      public boolean getStretchy()
      Get whether this MetSymbol can be stretched or not.
      Overrides:
      getStretchy in class Glyph
      Returns:
      true if can be stretched.
    • getEqualSides

      public boolean getEqualSides()
      Get whether this MetSymbol has equals sides (width and height).
      Overrides:
      getEqualSides in class RectangleGlyph
      Returns:
      true
    • getSymetricReshape

      public boolean getSymetricReshape()
      Get whether this MetSymbol should be stretched symetrically or not.
      Overrides:
      getSymetricReshape in class RectangleGlyph
      Returns:
      true
    • getCoverage

      public double getCoverage()
      Get the coverage value : lies between 0 and 100 (%)
      Returns:
      coverage in percent
    • setCoverage

      public void setCoverage(double coverage)
      Set the coverage value : lies between 0 and 100 (%)
      Parameters:
      coverage - coverage in percent
    • getParamValue

      public Object getParamValue(int index)
      Get the parameter value at the index specified.
      Overrides:
      getParamValue in class MetSymbol
      Parameters:
      index - index into param array
      Returns:
      always returns the coverage as a Double
    • setParamValue

      public void setParamValue(int index, Object v)
      Set the parameter value at the index specified. Since this MetSymbol only has one parameter, it sets the value at index 0.
      Overrides:
      setParamValue in class MetSymbol
      Parameters:
      index - parameter index. Ignored in this object.
      v - value for the parameter (String representation of coverage).
      See Also:
    • draw

      public void draw(Graphics2D g, int x, int y, int width, int height)
      draw the symbol at the specified location
      Specified by:
      draw in class MetSymbol
      Parameters:
      g - Graphics2D object
      x - x position
      y - y position
      width - width of symbol
      height - height of symbol