Package org.ka2ddo.yaac.gui
Class GuiSymbols.GuiSymbolImage
java.lang.Object
org.ka2ddo.yaac.gui.GuiSymbols.GuiSymbolImage
- All Implemented Interfaces:
Cloneable
,SymbolImageData
- Enclosing class:
- GuiSymbols
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 Summary
Modifier and TypeMethodDescriptionclone()
Creates and returns a copy of this object.Get the most common color with a transparency of 100 (instead of the default opaque value of 255).Get the most common color with a transparency of 75 (instead of the default opaque value of 255).Get the color most likely to contrast with this image.Get the contrasting color with a transparency of 100 (instead of the default opaque value of 255).Get the double-sized (32x32) sized icon for this symbol.getIcon()
Get the standard (16x16) sized icon for this symbol.Get the most commonly used color for a given symbol.Get the quadruple-sized (64x64) sized icon for this symbol.boolean
Indicate whether this is a copy of the alternate table image that expects an overlay character,
-
Method Details
-
getIcon
Get the standard (16x16) sized icon for this symbol.- Returns:
- ImageIcon for the APRS symbol code
-
getDblIcon
Get the double-sized (32x32) sized icon for this symbol.- Returns:
- ImageIcon for the APRS symbol code
-
getQuadIcon
Get the quadruple-sized (64x64) sized icon for this symbol.- Returns:
- ImageIcon for the APRS symbol code
-
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
Get the color most likely to contrast with this image.- Returns:
- Color with good contrast to the image
-
getColor100
Get the most common color with a transparency of 100 (instead of the default opaque value of 255).- Returns:
- partially transparent Color
-
getContrastingColor100
Get the contrasting color with a transparency of 100 (instead of the default opaque value of 255).- Returns:
- partially transparent 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 interfaceSymbolImageData
- Returns:
- boolean true if overlay character should be displayed
-
clone
Creates and returns a copy of this object.- Overrides:
clone
in classObject
- Returns:
- a clone of this instance.
- Throws:
CloneNotSupportedException
- if the object's class does not support theCloneable
interface. Subclasses that override theclone
method can also throw this exception to indicate that an instance cannot be cloned.
-