public class PlafPaintUtils extends Object
| Constructor and Description |
|---|
PlafPaintUtils()
|
| Modifier and Type | Method and Description |
|---|---|
static void |
drawBevel(Graphics2D
Uses translucent shades of white and black to draw highlights and shadows around a rectangle, and then frames the rectangle with a shade of gray (120).
|
static TexturePaint |
getCheckerBoard(int checkerSize)
|
static TexturePaint |
getCheckerBoard(int checkerSize, Color
|
static Color |
getFocusRingColor()
|
static void |
paintFocus(Graphics2D
Paints 3 different strokes around a shape to indicate focus.
|
static void |
paintFocus(Graphics2D
Paints 3 different strokes around a shape to indicate focus.
|
static Color |
tween(Color
Tweens between the two arguments.
|
public static ColorgetFocusRingColor()
UIManager.put("focusRing",customColor);
public static void paintFocus(Graphics2Dg, Shape shape, int pixelSize)
The catch is that you have to render this underneath the shape, and the shape should be filled completely.
g - the graphics to paint to
shape - the shape to outline
pixelSize - the number of pixels the outline should cover.
public static void paintFocus(Graphics2Dg, Shape shape, int pixelSize, Color focusColor, boolean changeRenderingHints)
The catch is that you have to render this underneath the shape, and the shape should be filled completely.
g - the graphics to paint to
shape - the shape to outline
pixelSize - the number of pixels the outline should cover.
focusColor - the color of the focus ring to paint
changeRenderingHints - if true then the rendering hints will be modified, if false they will be left in tact
public static void drawBevel(Graphics2Dg, Rectangle r)
This should be called to add a finishing touch on top of existing graphics.
g - the graphics to paint to.
r - the rectangle to paint.
public static TexturePaintgetCheckerBoard(int checkerSize)
public static TexturePaintgetCheckerBoard(int checkerSize, Color color1, Color color2)