|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.swingx.color.ColorUtil
public class ColorUtil
| Constructor Summary | |
|---|---|
ColorUtil()
|
|
| Method Summary | |
|---|---|
static Paint |
getCheckerPaint()
Obtain a java.awt.Paint instance which draws a checker
background of black and white. |
static Paint |
getCheckerPaint(Color c1,
Color c2,
int size)
|
static Color |
removeAlpha(Color color)
Returns a new color equal to the old one, except that there is no alpha channel (transparency). |
static Color |
setAlpha(Color col,
int alpha)
Modifies the passed in color by setting a new alpha channel (transparency) and returns the new color. |
static Color |
setBrightness(Color color,
float brightness)
Modifies the passed in color by changing it's brightness using HSB calculations. |
static void |
tileStretchPaint(Graphics g,
JComponent comp,
BufferedImage img,
Insets ins)
Draws an image on top of a component by doing a 3x3 grid stretch of the image using the specified insets. |
static String |
toHexString(Color color)
Produces a String representing the passed in color as a hex value (including the #) suitable for use in html. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ColorUtil()
| Method Detail |
|---|
public static Color removeAlpha(Color color)
color - the color to remove the alpha (transparency) from
public static Color setAlpha(Color col,
int alpha)
col - the color to modifyalpha - the new alpha (transparency) level. Must be an int between 0 and 255
public static Color setBrightness(Color color,
float brightness)
color - the color to modifybrightness - the brightness to use in the new color
public static String toHexString(Color color)
color - the color to convert
public static Paint getCheckerPaint()
java.awt.Paint instance which draws a checker
background of black and white.
Note: The returned instance may be shared.
Note: This method should be reimplemented to not use a png resource.
public static Paint getCheckerPaint(Color c1,
Color c2,
int size)
public static void tileStretchPaint(Graphics g,
JComponent comp,
BufferedImage img,
Insets ins)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||