org.jfree.util
Class PaintUtilities
java.lang.Objectorg.jfree.util.PaintUtilities
Utility code that relates to Paint objects.
static String | colorToString(Color c)- Converts a color into a string.
|
static boolean | equal(Paint p1, Paint p2)- Returns
true if the two Paint objects are equal
OR both null.
|
static Color | stringToColor(String value)- Converts a given string into a color.
|
colorToString
public static String colorToString(Color c)
Converts a color into a string. If the color is equal to one of the
defined constant colors, that name is returned instead. Otherwise the
color is returned as hex-string.
- the string for this color.
equal
public static boolean equal(Paint p1,
Paint p2) Returns true if the two Paint objects are equal
OR both null. This method handles
GradientPaint as a special case.
p1 - paint 1 (null permitted).p2 - paint 2 (null permitted).
stringToColor
public static Color stringToColor(String value)
Converts a given string into a color.
value - the string, either a name or a hex-string.