Class GuiSymbols.GuiSymbolImage

java.lang.Object
org.ka2ddo.yaac.gui.GuiSymbols.GuiSymbolImage
All Implemented Interfaces:
Cloneable, SymbolImageData
Enclosing class:
GuiSymbols

public static class GuiSymbols.GuiSymbolImage extends Object implements SymbolImageData, Cloneable
This class collects a symbol icon image with read-only attributes of the symbol that are commonly used but expensive to compute.
Author:
Andrew Pavlin, KA2DDO
  • Method Details

    • getIcon

      public ImageIcon getIcon()
      Get the standard (16x16) sized icon for this symbol.
      Returns:
      ImageIcon for the APRS symbol code
    • getDblIcon

      public ImageIcon getDblIcon()
      Get the double-sized (32x32) sized icon for this symbol.
      Returns:
      ImageIcon for the APRS symbol code
    • getQuadIcon

      public ImageIcon getQuadIcon()
      Get the quadruple-sized (64x64) sized icon for this symbol.
      Returns:
      ImageIcon for the APRS symbol code
    • getMostCommonColor

      public Color getMostCommonColor()
      Get the most commonly used color for a given symbol. If an overlaid symbol is specified (that has not been defined as an APRS 1.2 extension), automatically fall back to the corresponding alternate table symbol.
      Returns:
      most frequently appearing color value in this symbol (ignoring transparent background)
    • getContrastingColor

      public Color getContrastingColor()
      Get the color most likely to contrast with this image.
      Returns:
      Color with good contrast to the image
    • getColor100

      public Color getColor100()
      Get the most common color with a transparency of 100 (instead of the default opaque value of 255).
      Returns:
      partially transparent Color
    • getContrastingColor100

      public Color getContrastingColor100()
      Get the contrasting color with a transparency of 100 (instead of the default opaque value of 255).
      Returns:
      partially transparent Color
    • getColor75

      public Color getColor75()
      Get the most common color with a transparency of 75 (instead of the default opaque value of 255).
      Returns:
      partially transparent Color
    • isNeedsOverlay

      public boolean isNeedsOverlay()
      Indicate whether this is a copy of the alternate table image that expects an overlay character,
      Specified by:
      isNeedsOverlay in interface SymbolImageData
      Returns:
      boolean true if overlay character should be displayed
    • clone

      public Object clone() throws CloneNotSupportedException
      Creates and returns a copy of this object.
      Overrides:
      clone in class Object
      Returns:
      a clone of this instance.
      Throws:
      CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.