| java.lang.Object org.jfree.util.PaintUtilities
PaintUtilities | public class PaintUtilities (Code) | | Utility code that relates to Paint objects.
author: David Gilbert |
Method Summary | |
public static String | colorToString(Color c) Converts a color into a string. | public static boolean | equal(Paint p1, Paint p2) Returns true if the two Paint objects are equal
OR both null . | public static Color | stringToColor(String value) Converts a given string into a color.
Parameters: value - the string, either a name or a hex-string. |
colorToString | public static String colorToString(Color c)(Code) | | 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.
Parameters: c - the color. the string for this color. |
equal | public static boolean equal(Paint p1, Paint p2)(Code) | | Returns true if the two Paint objects are equal
OR both null . This method handles
GradientPaint as a special case.
Parameters: p1 - paint 1 (null permitted). Parameters: p2 - paint 2 (null permitted). A boolean. |
stringToColor | public static Color stringToColor(String value)(Code) | | Converts a given string into a color.
Parameters: value - the string, either a name or a hex-string. the color. |
|
|