Java Platform 1.2

javax.swing.plaf.basic
Class BasicGraphicsUtils

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicGraphicsUtils

public class BasicGraphicsUtils
extends Object


Constructor Summary
BasicGraphicsUtils()
           
 
Method Summary
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 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicGraphicsUtils

public BasicGraphicsUtils()
Method Detail

drawEtchedRect

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

getEtchedInsets

public static Insets getEtchedInsets()
Returns the amount of space taken up by a border drawn by drawEtchedRect()
Returns:
the inset of an etched rect

drawGroove

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

getGrooveInsets

public static Insets getGrooveInsets()
Returns the amount of space taken up by a border drawn by drawGroove()
Returns:
the inset of a groove border

drawBezel

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)

drawLoweredBezel

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

drawString

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

drawDashedRect

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

getPreferredButtonSize

public static Dimension getPreferredButtonSize(AbstractButton b,
                                               int textIconGap)

Java Platform 1.2

Submit a bug or feature Version 1.2 of Java Platform API Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.