|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tigris.gef.util.ColorUtility
public class ColorUtility
A flyweight factory class used to get color instances. This only creates new instances of a Color if required. Previous instances are cached.
| Method Summary | |
|---|---|
static java.awt.Color |
getColor(java.lang.String colorDescr)
A flyweight factory method for reusing the same Color value multiple times. |
static java.awt.Color |
getColor(java.lang.String colorDescr,
java.awt.Color defaultColor)
A flyweight factory method for reusing the same Color value multiple times. |
static java.lang.String |
getColorName(java.awt.Color color)
Get a color name for a color or null if this is some custom color. |
static java.lang.String |
getPgmlColor(java.awt.Color color)
Get the PGML description of a color. |
static java.lang.String |
getSvgColor(java.awt.Color color)
Get the SVG description of a color. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.awt.Color getColor(java.lang.String colorDescr,
java.awt.Color defaultColor)
colorDescr - A string of RGB values seperated by space
or a color name recognised by PGML (later to include SVG)defaultColor - a color to return if the color description can't be
interpretted.
public static java.awt.Color getColor(java.lang.String colorDescr)
colorDescr - A string of RGB values seperated by space
or a color name recognised by PGML (later to include SVG)
public static java.lang.String getColorName(java.awt.Color color)
color -
public static java.lang.String getPgmlColor(java.awt.Color color)
color - The color to convert to PGML style
public static java.lang.String getSvgColor(java.awt.Color color)
color - The color to convert to SVG style
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||