public class

BasicGraphicsUtils

extends Object
java.lang.Object
   ↳ javax.swing.plaf.basic.BasicGraphicsUtils

Summary

Public Constructors
BasicGraphicsUtils()
Public Methods
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)
static void drawDashedRect(Graphics g, int x, int y, int width, int height)
static void drawEtchedRect(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
static void drawGroove(Graphics g, int x, int y, int w, int h, Color shadow, Color highlight)
static void drawLoweredBezel(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
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 getEtchedInsets()
Returns the amount of space taken up by a border drawn by drawEtchedRect()
static Insets getGrooveInsets()
Returns the amount of space taken up by a border drawn by drawGroove()
static Dimension getPreferredButtonSize(AbstractButton b, int textIconGap)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public BasicGraphicsUtils ()

Public Methods

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)

public static void drawDashedRect (Graphics g, int x, int y, int width, int height)

public static void drawEtchedRect (Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)

public static void drawGroove (Graphics g, int x, int y, int w, int h, Color shadow, Color highlight)

public static void drawLoweredBezel (Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)

public 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. The first occurrence of underlineChar in text will be underlined. The matching algorithm is not case sensitive.

public 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. The character at index underlinedIndex in text will be underlined. If index is beyond the bounds of text (including < 0), nothing will be underlined.

Parameters
g Graphics to draw with
text String to draw
underlinedIndex Index of character in text to underline
x x coordinate to draw at
y y coordinate to draw at

public static Insets getEtchedInsets ()

Returns the amount of space taken up by a border drawn by drawEtchedRect()

Returns
  • the inset of an etched rect

public static Insets getGrooveInsets ()

Returns the amount of space taken up by a border drawn by drawGroove()

Returns
  • the inset of a groove border

public static Dimension getPreferredButtonSize (AbstractButton b, int textIconGap)