| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public class BasicGraphicsUtils extends Object
Constructor Summary | |
---|---|
|
Method Summary | |
---|---|
static void |
|
static void |
drawDashedRect(Graphics g, int x, int y, int width, int height) |
static void |
|
static void |
drawGroove(Graphics g, int x, int y, int w, int h, Color shadow, Color highlight) |
static void |
|
static void |
drawString(Graphics g, String text, int underlinedChar, int x, int y) Draw a string with the graphics g at location (x,y)
just like g.drawString would.
|
static void |
drawStringUnderlineCharAt(Graphics g, String text, int underlinedIndex, int x, int y) Draw a string with the graphics g at location
(x , y )
just like g.drawString would.
|
static Insets |
Returns the amount of space taken up by a border drawn by drawEtchedRect()
|
static Insets |
Returns the amount of space taken up by a border drawn by drawGroove()
|
static Dimension |
getPreferredButtonSize(AbstractButton b, int textIconGap) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicGraphicsUtils()
Method Detail |
---|
public static void drawBezel(Graphics g, int x, int y, int w, int h, boolean isPressed, boolean isDefault, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
g
x
y
w
h
isPressed
isDefault
shadow
darkShadow
highlight
lightHighlight
public static void drawDashedRect(Graphics g, int x, int y, int width, int height)
g
x
y
width
height
public static void drawEtchedRect(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
g
x
y
w
h
shadow
darkShadow
highlight
lightHighlight
public static void drawGroove(Graphics g, int x, int y, int w, int h, Color shadow, Color highlight)
g
x
y
w
h
shadow
highlight
public static void drawLoweredBezel(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
g
x
y
w
h
shadow
darkShadow
highlight
lightHighlight
public static void drawString(Graphics g, String text, int underlinedChar, int x, int y)
g
at location (x,y)
just like g.drawString
would.
The first occurrence of underlineChar
in text will be underlined. The matching algorithm is
not case sensitive.
g
text
underlinedChar
x
y
public static void drawStringUnderlineCharAt(Graphics g, String text, int underlinedIndex, int x, int y)
g
at location
(x
, y
)
just like g.drawString
would.
The character at index underlinedIndex
in text will be underlined. If index
is beyond the
bounds of text
(including < 0), nothing will be
underlined.
g
- Graphics to draw withtext
- String to drawunderlinedIndex
- Index of character in text to underlinex
- x coordinate to draw aty
- y coordinate to draw atpublic static Insets getEtchedInsets()
drawEtchedRect()
public static Insets getGrooveInsets()
drawGroove()
public static Dimension getPreferredButtonSize(AbstractButton b, int textIconGap)
b
textIconGap
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |