|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectTask.Support.GUISupport.DrawingUtils
public class DrawingUtils
DrawingUtils is a utility class that helps with drawing operations - reflections and other effects.
| Field Summary | |
|---|---|
static java.awt.Color[] |
GRAY_4GRAD
|
static java.awt.Color[] |
REV_GRAY_4GRAD
|
static java.awt.Color[] |
WHITE_2GRAD
|
| Constructor Summary | |
|---|---|
DrawingUtils()
|
|
| Method Summary | |
|---|---|
static java.awt.Graphics2D |
applyDesktopAASettings(java.awt.Graphics2D g)
Applies the Desktop Anti Aliasing settings to the given Graphics2D object. |
static java.awt.Graphics2D |
applySmoothDrawingSettings(java.awt.Graphics2D g)
Applies AA settings to the Graphics2D context for smoothing out drawing. |
static void |
drawBorderedTranslucentImage(java.awt.Graphics g,
int width,
int height,
boolean enabled,
java.awt.Color[] fourGradientTheme)
Given a BufferedImage, this method returns a rounded, gradient, translucency effect on top of it, and retursn it as a new BufferedImage. |
static void |
drawSemiTransparentShade(java.awt.Graphics g,
int width,
int height,
java.awt.Color[] twoGradientTheme)
|
static void |
drawShade4Stops(java.awt.Graphics g,
int width,
int height,
java.awt.Color[] fourGradientTheme,
float alpha)
|
static void |
drawShadeFast(java.awt.Graphics g,
int width,
int height,
java.awt.Color[] twoGradientTheme,
float alpha)
|
static void |
drawShadeNormal(java.awt.Graphics g,
int width,
int height,
java.awt.Color[] twoGradientTheme,
float alpha)
|
static java.awt.image.BufferedImage |
getBlurredImage(java.awt.image.BufferedImage buf)
Given a BufferedImage, this method returns a blurred version of the image as a new BufferedImage. |
static com.sun.java.swing.Painter |
getContentPanelBgPainter()
|
static javax.swing.border.Border |
getDarkBorder()
|
static com.sun.java.swing.Painter |
getDisabledGlassPaneBgPainter(int width,
int height)
|
static com.sun.java.swing.Painter |
getDropTargetLabelBgPainter()
|
static java.awt.image.BufferedImage |
getGlossyImage(java.awt.image.BufferedImage image)
|
static java.awt.image.BufferedImage |
getGlossyImage(java.awt.image.BufferedImage image,
java.awt.Color color,
org.jdesktop.swingx.painter.GlossPainter.GlossPosition position)
given a bufferedimage, returns a glossy version of the image, with the given color and gloss position applied |
static com.sun.java.swing.Painter |
getGradientFillBgPainter(int width,
int height,
java.awt.Color color1,
java.awt.Color color2)
|
static com.sun.java.swing.Painter |
getHeaderPanelBgPainter()
|
static com.sun.java.swing.Painter |
getInfoLabelBgPainter()
|
static javax.swing.border.Border |
getLightBorder()
|
static com.sun.java.swing.Painter |
getPanelBgPainter()
|
static java.awt.image.BufferedImage |
getReflection(java.awt.image.BufferedImage img,
float length,
float opacity,
boolean blur)
|
static org.jdesktop.swingx.painter.RectanglePainter |
getRoundedRectanglePainter(java.awt.Color fillColor,
java.awt.Color borderColor,
int borderWidth,
org.jdesktop.swingx.painter.AbstractAreaPainter.Style style,
int roundedWidth)
|
static com.sun.java.swing.Painter |
getStatusUpdaterBgPainter()
|
static java.awt.geom.Rectangle2D |
getTextBounds(java.awt.Graphics2D g2,
java.awt.Font font,
java.lang.String str)
|
static java.awt.image.BufferedImage |
getTranslucentImage(java.awt.image.BufferedImage buf,
float translucency)
Given a BufferedImage, this method returns a translucent version of this image as a new BufferedImage. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.awt.Color[] WHITE_2GRAD
public static java.awt.Color[] GRAY_4GRAD
public static java.awt.Color[] REV_GRAY_4GRAD
| Constructor Detail |
|---|
public DrawingUtils()
| Method Detail |
|---|
public static final java.awt.geom.Rectangle2D getTextBounds(java.awt.Graphics2D g2,
java.awt.Font font,
java.lang.String str)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static java.awt.Graphics2D applyDesktopAASettings(java.awt.Graphics2D g)
public static java.awt.Graphics2D applySmoothDrawingSettings(java.awt.Graphics2D g)
public static javax.swing.border.Border getLightBorder()
public static javax.swing.border.Border getDarkBorder()
public static java.awt.image.BufferedImage getReflection(java.awt.image.BufferedImage img,
float length,
float opacity,
boolean blur)
public static java.awt.image.BufferedImage getGlossyImage(java.awt.image.BufferedImage image)
public static java.awt.image.BufferedImage getGlossyImage(java.awt.image.BufferedImage image,
java.awt.Color color,
org.jdesktop.swingx.painter.GlossPainter.GlossPosition position)
public static org.jdesktop.swingx.painter.RectanglePainter getRoundedRectanglePainter(java.awt.Color fillColor,
java.awt.Color borderColor,
int borderWidth,
org.jdesktop.swingx.painter.AbstractAreaPainter.Style style,
int roundedWidth)
public static com.sun.java.swing.Painter getDropTargetLabelBgPainter()
public static com.sun.java.swing.Painter getPanelBgPainter()
public static com.sun.java.swing.Painter getStatusUpdaterBgPainter()
public static com.sun.java.swing.Painter getInfoLabelBgPainter()
public static com.sun.java.swing.Painter getContentPanelBgPainter()
public static com.sun.java.swing.Painter getHeaderPanelBgPainter()
public static com.sun.java.swing.Painter getGradientFillBgPainter(int width,
int height,
java.awt.Color color1,
java.awt.Color color2)
public static com.sun.java.swing.Painter getDisabledGlassPaneBgPainter(int width,
int height)
public static java.awt.image.BufferedImage getBlurredImage(java.awt.image.BufferedImage buf)
public static java.awt.image.BufferedImage getTranslucentImage(java.awt.image.BufferedImage buf,
float translucency)
translucency - between 0f and 1f.
public static void drawBorderedTranslucentImage(java.awt.Graphics g,
int width,
int height,
boolean enabled,
java.awt.Color[] fourGradientTheme)
public static void drawSemiTransparentShade(java.awt.Graphics g,
int width,
int height,
java.awt.Color[] twoGradientTheme)
public static void drawShadeNormal(java.awt.Graphics g,
int width,
int height,
java.awt.Color[] twoGradientTheme,
float alpha)
public static void drawShadeFast(java.awt.Graphics g,
int width,
int height,
java.awt.Color[] twoGradientTheme,
float alpha)
alpha - this is ignored... kept to have same method signature as drawShadeNormal(java.awt.Graphics, int, int, java.awt.Color[], float)
public static void drawShade4Stops(java.awt.Graphics g,
int width,
int height,
java.awt.Color[] fourGradientTheme,
float alpha)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||