|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vizzini.ui.ColorUtilities
public class ColorUtilities
Provides utility methods for dealing with Color
objects.
Constructor Summary | |
---|---|
ColorUtilities()
|
Method Summary | |
---|---|
static Color |
blend(Color color0,
Color color1)
Blend the given colors. |
static Color |
brighter(Color color)
Return a color brighter than the given color. |
static Color |
complement(Color color)
Return the complementary color. |
static Color |
convertFromString(String colorDesc)
Return a Color object described by the given
String . |
static String |
convertToString(Color color)
Return a String description of the given color. |
static Color |
darker(Color color)
Return a color darker than the given color. |
static String |
toString(Color color)
Return a formatted String describing the given
Color . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ColorUtilities()
Method Detail |
---|
public static Color blend(Color color0, Color color1)
public static Color brighter(Color color)
color
- The color of interest.
IllegalArgumentException
- if color is null.darker(java.awt.Color)
public static Color complement(Color color)
public static Color convertFromString(String colorDesc)
Color
object described by the given
String
. The method calls convertFromString(convertToString( color
) ) return the original color.
colorDesc
- A String
description of a color.
IllegalArgumentException
- if colorDesc is null.
IllegalArgumentException
- if the integers in colorDesc are
outside the range [0,255].
NumberFormatException
- if the description is improperly
formatted.convertToString(java.awt.Color)
public static String convertToString(Color color)
String
description of the given color. The method
calls convertToString( convertFromString( string ) ) return the original
string.
color
- The color of interest.
IllegalArgumentException
- if color is null.convertFromString(java.lang.String)
public static Color darker(Color color)
color
- The color of interest.
IllegalArgumentException
- if color is null.brighter(java.awt.Color)
public static String toString(Color color)
String
describing the given
Color
. This method mimics the behavior of
java.awt.Color.toString() with the addition of the alpha component.
color
- The color of interest.
IllegalArgumentException
- if color is null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |