Class TopoLayer.ElevationColor

java.lang.Object
org.ka2ddo.yaac.gui.TopoLayer.ElevationColor
All Implemented Interfaces:
Serializable, Cloneable
Enclosing class:
TopoLayer

public static class TopoLayer.ElevationColor extends Object implements Cloneable, Serializable
Object representing a rendering color and corresponding elevation level in meters.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
    The alpha (transparency) of this object, from 0 to 255.
    int
    The blue color strength of this object, from 0 to 255.
    int
    The elevation value in the default short DistanceUnit.
    int
    The green color strength of this object, from 0 to 255.
    int
    The red color strength of this object, from 0 to 255.
    int
    The combination of the red, green, blue, and alpha fields as a single 32-bit int value.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates and returns a copy of this object.
    boolean
    Indicates whether some other object is "equal to" this one.
    long
    Return encoding for storing an ElevationColor in the Preferences.
    int
    Returns a hash code value for the object.
    void
    setColor(int argb)
    Set the ElevationColor's color to the specified ARGB value.
    void
    setColor(Color color)
    Set the Color associated with this elevation.
    void
    setEncoding(long enc)
    Set the ElevationColor to the values associated with the internal encoding.

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • elevation

      public int elevation
      The elevation value in the default short DistanceUnit.
    • red

      public int red
      The red color strength of this object, from 0 to 255.
    • green

      public int green
      The green color strength of this object, from 0 to 255.
    • blue

      public int blue
      The blue color strength of this object, from 0 to 255.
    • alpha

      public int alpha
      The alpha (transparency) of this object, from 0 to 255.
    • rgb

      public int rgb
      The combination of the red, green, blue, and alpha fields as a single 32-bit int value.
  • Method Details

    • setColor

      public void setColor(Color color)
      Set the Color associated with this elevation.
      Parameters:
      color - Color to use
    • clone

      public Object clone()
      Creates and returns a copy of this object.
      Overrides:
      clone in class Object
      Returns:
      a clone of this instance.
    • equals

      public boolean equals(Object obj)
      Indicates whether some other object is "equal to" this one.
      Overrides:
      equals in class Object
      Parameters:
      obj - the reference object with which to compare.
      Returns:
      true if this object is the same as the obj argument; false otherwise.
      See Also:
    • hashCode

      public int hashCode()
      Returns a hash code value for the object.
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for this object.
      See Also:
    • getEncoding

      public long getEncoding()
      Return encoding for storing an ElevationColor in the Preferences.
      Returns:
      long encoding of ElevationColor's internal value
    • setEncoding

      public void setEncoding(long enc)
      Set the ElevationColor to the values associated with the internal encoding.
      Parameters:
      enc - long encoding value
    • setColor

      public void setColor(int argb)
      Set the ElevationColor's color to the specified ARGB value.
      Parameters:
      argb - ARGB value of color to set