|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bric.awt.PaintUtils
public class PaintUtils
Some static methods for some common painting functions.
Field Summary | |
---|---|
static java.awt.Color[] |
blacks
Four shades of black, each with increasing opacity. |
static java.awt.Color[] |
whites
Four shades of white, each with increasing opacity. |
Constructor Summary | |
---|---|
PaintUtils()
|
Method Summary | |
---|---|
static void |
drawBevel(java.awt.Graphics g,
java.awt.Rectangle r)
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 java.awt.Color |
getFocusRingColor()
|
static void |
paintFocus(java.awt.Graphics2D g,
java.awt.Shape shape,
int biggestStroke)
Paints 3 different strokes around a shape to indicate focus. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.awt.Color[] whites
public static final java.awt.Color[] blacks
Constructor Detail |
---|
public PaintUtils()
Method Detail |
---|
public static java.awt.Color getFocusRingColor()
UIManager.put("focusRing",customColor);
public static void paintFocus(java.awt.Graphics2D g, java.awt.Shape shape, int biggestStroke)
The catch is that you have to render this underneath the shape, and the shape should be filled completely.
g
- the graphics to paint toshape
- the shape to outlinebiggestStroke
- the widest stroke to use.public static void drawBevel(java.awt.Graphics g, java.awt.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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |