public class PaintUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static Color[] |
blacks
Four shades of black, each with increasing opacity.
|
static Color[] |
whites
Four shades of white, each with increasing opacity.
|
| Constructor and Description |
|---|
PaintUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
drawBevel(Graphics 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).
|
private static void |
drawColors(Color[] colors,
Graphics g,
int x1,
int y1,
int x2,
int y2,
int direction) |
static Color |
getFocusRingColor() |
static void |
paintFocus(Graphics2D g,
Shape shape,
int biggestStroke)
Paints 3 different strokes around a shape to indicate focus.
|
public static final Color[] whites
public static final Color[] blacks
public static Color getFocusRingColor()
UIManager.put("focusRing",customColor);public static void paintFocus(Graphics2D g, 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(Graphics 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.Copyright © 2007–2017 Gephi Consortium. All rights reserved.