|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.util.swing.colorpicker.PlafPaintUtils
public class PlafPaintUtils
Some static methods for some common painting functions.
Constructor Summary | |
---|---|
PlafPaintUtils()
|
Method Summary | |
---|---|
static void |
drawBevel(Graphics2D g,
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 TexturePaint |
getCheckerBoard(int checkerSize)
|
static Color |
getFocusRingColor()
|
static void |
paintFocus(Graphics2D g,
Shape shape,
int pixelSize)
Paints 3 different strokes around a shape to indicate focus. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PlafPaintUtils()
Method Detail |
---|
public static Color getFocusRingColor()
UIManager.put("focusRing",customColor);
public static void paintFocus(Graphics2D g, 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 toshape
- the shape to outlinepixelSize
- the number of pixels the outline should cover.public static void drawBevel(Graphics2D g, 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 TexturePaint getCheckerBoard(int checkerSize)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |