public class PaintUtilities extends java.lang.Object
Paint
objects.Modifier and Type | Method and Description |
---|---|
static java.lang.String |
colorToString(java.awt.Color c)
Converts a color into a string.
|
static boolean |
equal(java.awt.Paint p1,
java.awt.Paint p2)
Returns
true if the two Paint objects are equal
OR both null . |
static java.awt.Color |
stringToColor(java.lang.String value)
Converts a given string into a color.
|
public static boolean equal(java.awt.Paint p1, java.awt.Paint p2)
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).public static java.lang.String colorToString(java.awt.Color c)
c
- the color.public static java.awt.Color stringToColor(java.lang.String value)
value
- the string, either a name or a hex-string.