public final class SymColor extends java.awt.Color implements Enumeration, Displayable
Modifier and Type | Field and Description |
---|---|
static SymColor |
black |
static SymColor |
blue |
static SymColor |
darkGreen |
static SymColor |
darkRed |
static SymColor |
gray |
static SymColor |
green |
static SymColor |
lightRed |
static SymColor |
magenta |
static SymColor |
red |
static SymColor |
white |
Modifier and Type | Method and Description |
---|---|
void |
drawListIcon(java.awt.Graphics2D g,
int x,
int y)
implement this to provide nice drawing of icon on printing graphics context.
|
javax.swing.Icon |
getListIcon()
An icon can be provided that will be shown in a list
along with the textual description of the element.
|
java.lang.String |
getListLabel()
return a
String that will help the user
identify this item when choosing from a list. |
static SymColor |
parseSymColor(java.lang.String str) |
java.awt.Color |
toColor() |
java.lang.String |
toString()
Type-safe Enumerations implementing this interface
should override the toString() method to return a
String that will be helpful to the user
when choosing this as an option from a list. |
brighter, createContext, darker, decode, equals, getAlpha, getBlue, getColor, getColor, getColor, getColorComponents, getColorComponents, getColorSpace, getComponents, getComponents, getGreen, getHSBColor, getRed, getRGB, getRGBColorComponents, getRGBComponents, getTransparency, hashCode, HSBtoRGB, RGBtoHSB
public static final SymColor black
public static final SymColor blue
public static final SymColor lightRed
public static final SymColor red
public static final SymColor darkRed
public static final SymColor green
public static final SymColor darkGreen
public static final SymColor white
public static final SymColor gray
public static final SymColor magenta
public javax.swing.Icon getListIcon()
null
if there
is no icon available.getListIcon
in interface Displayable
getListIcon
in interface Enumeration
public void drawListIcon(java.awt.Graphics2D g, int x, int y)
Displayable
drawListIcon
in interface Displayable
g
- the graphics context.x
- the x position, typically 0.y
- the y position, typically 0.public java.lang.String getListLabel()
Displayable
String
that will help the user
identify this item when choosing from a list.getListLabel
in interface Displayable
public java.lang.String toString()
Enumeration
String
that will be helpful to the user
when choosing this as an option from a list.toString
in interface Enumeration
toString
in class java.awt.Color
public java.awt.Color toColor()
public static SymColor parseSymColor(java.lang.String str)