|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.swingx.util.PaintUtils
public class PaintUtils
A collection of utilties for painting visual effects.
Field Summary | |
---|---|
static GradientPaint |
AERITH
|
static GradientPaint |
BLUE_EXPERIENCE
|
static GradientPaint |
GRAY
|
static GradientPaint |
MAC_OSX
|
static GradientPaint |
MAC_OSX_SELECTED
|
static GradientPaint |
NIGHT_GRAY
|
static GradientPaint |
NIGHT_GRAY_LIGHT
|
static GradientPaint |
RED_XP
|
Method Summary | |
---|---|
static BufferedImage |
convertToBufferedImage(Image img)
|
static BufferedImage |
createCompatibleImage(int width,
int height)
|
static BufferedImage |
createCompatibleImage(int width,
int height,
int transparency)
|
static Border |
getDefaultBorder()
|
static Rectangle |
getTextBounds(Graphics g,
JLabel label)
Returns the bounds that the text of a label will be drawn into. |
static BufferedImage |
loadCompatibleImage(InputStream in)
|
static BufferedImage |
loadCompatibleImage(URL resource)
Loads the image at the URL and makes it compatible with the screen. |
static void |
paintGradient(Graphics g,
JComponent comp,
Color color1,
Color color2)
Paints a top to bottom gradient fill over the component bounds from color1 to color2. |
static Paint |
resizeGradient(Paint p,
int width,
int height)
Resizes a gradient to fill the width and height available. |
static void |
setBackgroundColor(Container cont,
Color color)
Sets the background color for a containment hierarchy. |
static void |
setFont(Container cont,
Font font)
Sets the font for a containment hierarchy. |
static void |
setForegroundColor(Container cont,
Color color)
Sets the foreground color for a containment hierarchy. |
static Shape |
setMergedClip(Graphics2D g,
Shape newClip)
Sets then clip on a graphics object by merging with the existing clip instead of replacing it. |
static BufferedImage |
toCompatibleImage(BufferedImage image)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final GradientPaint BLUE_EXPERIENCE
public static final GradientPaint MAC_OSX_SELECTED
public static final GradientPaint MAC_OSX
public static final GradientPaint AERITH
public static final GradientPaint GRAY
public static final GradientPaint RED_XP
public static final GradientPaint NIGHT_GRAY
public static final GradientPaint NIGHT_GRAY_LIGHT
Method Detail |
---|
public static Border getDefaultBorder()
public static Rectangle getTextBounds(Graphics g, JLabel label)
public static void paintGradient(Graphics g, JComponent comp, Color color1, Color color2)
public static void setBackgroundColor(Container cont, Color color)
public static void setForegroundColor(Container cont, Color color)
public static void setFont(Container cont, Font font)
public static BufferedImage createCompatibleImage(int width, int height)
width
- the width of the new BufferedImageheight
- the height of the new BufferedImage
public static BufferedImage createCompatibleImage(int width, int height, int transparency)
width
- the width of the new BufferedImageheight
- the height of the new BufferedImagetransparency
- one of the values in the Transparency interface
public static BufferedImage convertToBufferedImage(Image img)
public static BufferedImage loadCompatibleImage(URL resource) throws IOException
IOException
public static BufferedImage loadCompatibleImage(InputStream in) throws IOException
IOException
public static BufferedImage toCompatibleImage(BufferedImage image)
public static Shape setMergedClip(Graphics2D g, Shape newClip)
public static Paint resizeGradient(Paint p, int width, int height)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |