|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.swingx.color.ColorUtil
@Deprecated public final class ColorUtil
A collection of utility methods for working with Colors.
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
@Deprecated public static Color removeAlpha(Color color)
PaintUtils.removeAlpha(Color) instead
This method is a convenience and has the same effect as setAlpha(color, 255).
color - the color to remove the alpha (transparency) from
Color
NullPointerException - if color is null
@Deprecated
public static Color setAlpha(Color color,
int alpha)
PaintUtils.setAlpha(Color,int) instead
color - the color to modifyalpha - the new alpha (transparency) level. Must be an int between 0
and 255
Color
IllegalArgumentException - if alpha is not between 0 and 255 inclusive
NullPointerException - if color is null
@Deprecated
public static Color setSaturation(Color color,
float saturation)
PaintUtils.setSaturation(Color,float) instead
The color is modified using HSB calculations. The saturation must be a float between 0 and 1. If 0 the resulting color will be gray. If 1 the resulting color will be the most saturated possible form of the passed in color.
color - the color to modifysaturation - the saturation to use in the new color
Color
IllegalArgumentException - if saturation is not between 0 and 1 inclusive
NullPointerException - if color is null
@Deprecated
public static Color setBrightness(Color color,
float brightness)
PaintUtils.setBrightness(Color,float) instead
The color is modified using HSB calculations. The brightness must be a float between 0 and 1. If 0 the resulting color will be black. If 1 the resulting color will be the brightest possible form of the passed in color.
color - the color to modifybrightness - the brightness to use in the new color
Color
IllegalArgumentException - if brightness is not between 0 and 1 inclusive
NullPointerException - if color is null@Deprecated public static String toHexString(Color color)
PaintUtils.toHexString(Color) instead
String that represents the supplied color as a
hex-value RGB triplet, including the "#". The return value is suitable
for use in HTML. The alpha (transparency) channel is neither include nor
used in producing the string.
color - the color to convert
String@Deprecated public static Color computeForeground(Color bg)
PaintUtils.computeForeground(Color) instead
bg - the background color
Color.WHITE or Color.BLACK
NullPointerException - if bg is null
@Deprecated
public static Color blend(Color origin,
Color over)
PaintUtils.blend(Color,Color) instead
origin color is the
base for the new color and regardless of its alpha component, it is
treated as fully opaque (alpha 255).
origin - the base of the new colorover - the alpha-enabled color to add to the origin color
origin and over
colors
@Deprecated
public static Color interpolate(Color b,
Color a,
float t)
PaintUtils.interpolate(Color,Color,float) instead
b - a - t -
@Deprecated public static Paint getCheckerPaint()
PaintUtils.getCheckerPaint() instead
Paint that is a checkered effect using the colors gray and Color.WHITE.
@Deprecated
public static Paint getCheckerPaint(Color c1,
Color c2,
int size)
PaintUtils.getCheckerPaint(Paint,Paint,int) instead
Paint that is a checkered effect using the specified colors.
While this method supports transparent colors, this implementation performs painting operations using the second color after it performs operations using the first color. This means that to create a checkered paint with a fully-transparent color, you MUST specify that color first.
c1 - the first colorc2 - the second colorsize - the size of the paint
Paint checkering the supplied colors
@Deprecated
public static void tileStretchPaint(Graphics g,
JComponent comp,
BufferedImage img,
Insets ins)
GraphicsUtilities.tileStretchPaint(Graphics,JComponent,BufferedImage,Insets) instead
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||