javax.swing.plaf.basic
Class BasicGraphicsUtils

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.plaf.basic.BasicGraphicsUtils

public class BasicGraphicsUtils
extends Object sample code for java.lang.Object definition code for java.lang.Object


Constructor Summary
BasicGraphicsUtils sample code for javax.swing.plaf.basic.BasicGraphicsUtils.BasicGraphicsUtils() definition code for javax.swing.plaf.basic.BasicGraphicsUtils.BasicGraphicsUtils() ()
           
 
Method Summary
static void drawBezel sample code for javax.swing.plaf.basic.BasicGraphicsUtils.drawBezel(java.awt.Graphics, int, int, int, int, boolean, boolean, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color) definition code for javax.swing.plaf.basic.BasicGraphicsUtils.drawBezel(java.awt.Graphics, int, int, int, int, boolean, boolean, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, int x, int y, int w, int h, boolean isPressed, boolean isDefault, Color sample code for java.awt.Color definition code for java.awt.Color  shadow, Color sample code for java.awt.Color definition code for java.awt.Color  darkShadow, Color sample code for java.awt.Color definition code for java.awt.Color  highlight, Color sample code for java.awt.Color definition code for java.awt.Color  lightHighlight)
           
static void drawDashedRect sample code for javax.swing.plaf.basic.BasicGraphicsUtils.drawDashedRect(java.awt.Graphics, int, int, int, int) definition code for javax.swing.plaf.basic.BasicGraphicsUtils.drawDashedRect(java.awt.Graphics, int, int, int, int) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, int x, int y, int width, int height)
           
static void drawEtchedRect sample code for javax.swing.plaf.basic.BasicGraphicsUtils.drawEtchedRect(java.awt.Graphics, int, int, int, int, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color) definition code for javax.swing.plaf.basic.BasicGraphicsUtils.drawEtchedRect(java.awt.Graphics, int, int, int, int, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, int x, int y, int w, int h, Color sample code for java.awt.Color definition code for java.awt.Color  shadow, Color sample code for java.awt.Color definition code for java.awt.Color  darkShadow, Color sample code for java.awt.Color definition code for java.awt.Color  highlight, Color sample code for java.awt.Color definition code for java.awt.Color  lightHighlight)
           
static void drawGroove sample code for javax.swing.plaf.basic.BasicGraphicsUtils.drawGroove(java.awt.Graphics, int, int, int, int, java.awt.Color, java.awt.Color) definition code for javax.swing.plaf.basic.BasicGraphicsUtils.drawGroove(java.awt.Graphics, int, int, int, int, java.awt.Color, java.awt.Color) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, int x, int y, int w, int h, Color sample code for java.awt.Color definition code for java.awt.Color  shadow, Color sample code for java.awt.Color definition code for java.awt.Color  highlight)
           
static void drawLoweredBezel sample code for javax.swing.plaf.basic.BasicGraphicsUtils.drawLoweredBezel(java.awt.Graphics, int, int, int, int, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color) definition code for javax.swing.plaf.basic.BasicGraphicsUtils.drawLoweredBezel(java.awt.Graphics, int, int, int, int, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, int x, int y, int w, int h, Color sample code for java.awt.Color definition code for java.awt.Color  shadow, Color sample code for java.awt.Color definition code for java.awt.Color  darkShadow, Color sample code for java.awt.Color definition code for java.awt.Color  highlight, Color sample code for java.awt.Color definition code for java.awt.Color  lightHighlight)
           
static void drawString sample code for javax.swing.plaf.basic.BasicGraphicsUtils.drawString(java.awt.Graphics, java.lang.String, int, int, int) definition code for javax.swing.plaf.basic.BasicGraphicsUtils.drawString(java.awt.Graphics, java.lang.String, int, int, int) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, String sample code for java.lang.String definition code for java.lang.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 sample code for javax.swing.plaf.basic.BasicGraphicsUtils.drawStringUnderlineCharAt(java.awt.Graphics, java.lang.String, int, int, int) definition code for javax.swing.plaf.basic.BasicGraphicsUtils.drawStringUnderlineCharAt(java.awt.Graphics, java.lang.String, int, int, int) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, String sample code for java.lang.String definition code for java.lang.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 sample code for java.awt.Insets definition code for java.awt.Insets getEtchedInsets sample code for javax.swing.plaf.basic.BasicGraphicsUtils.getEtchedInsets() definition code for javax.swing.plaf.basic.BasicGraphicsUtils.getEtchedInsets() ()
          Returns the amount of space taken up by a border drawn by drawEtchedRect()
static Insets sample code for java.awt.Insets definition code for java.awt.Insets getGrooveInsets sample code for javax.swing.plaf.basic.BasicGraphicsUtils.getGrooveInsets() definition code for javax.swing.plaf.basic.BasicGraphicsUtils.getGrooveInsets() ()
          Returns the amount of space taken up by a border drawn by drawGroove()
static Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getPreferredButtonSize sample code for javax.swing.plaf.basic.BasicGraphicsUtils.getPreferredButtonSize(javax.swing.AbstractButton, int) definition code for javax.swing.plaf.basic.BasicGraphicsUtils.getPreferredButtonSize(javax.swing.AbstractButton, int) (AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b, int textIconGap)
           
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

BasicGraphicsUtils sample code for javax.swing.plaf.basic.BasicGraphicsUtils() definition code for javax.swing.plaf.basic.BasicGraphicsUtils()

public BasicGraphicsUtils()
Method Detail

drawEtchedRect sample code for javax.swing.plaf.basic.BasicGraphicsUtils.drawEtchedRect(java.awt.Graphics, int, int, int, int, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color) definition code for javax.swing.plaf.basic.BasicGraphicsUtils.drawEtchedRect(java.awt.Graphics, int, int, int, int, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color)

public static void drawEtchedRect(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                                  int x,
                                  int y,
                                  int w,
                                  int h,
                                  Color sample code for java.awt.Color definition code for java.awt.Color  shadow,
                                  Color sample code for java.awt.Color definition code for java.awt.Color  darkShadow,
                                  Color sample code for java.awt.Color definition code for java.awt.Color  highlight,
                                  Color sample code for java.awt.Color definition code for java.awt.Color  lightHighlight)

getEtchedInsets sample code for javax.swing.plaf.basic.BasicGraphicsUtils.getEtchedInsets() definition code for javax.swing.plaf.basic.BasicGraphicsUtils.getEtchedInsets()

public static Insets sample code for java.awt.Insets definition code for java.awt.Insets  getEtchedInsets()
Returns the amount of space taken up by a border drawn by drawEtchedRect()

Returns:
the inset of an etched rect

drawGroove sample code for javax.swing.plaf.basic.BasicGraphicsUtils.drawGroove(java.awt.Graphics, int, int, int, int, java.awt.Color, java.awt.Color) definition code for javax.swing.plaf.basic.BasicGraphicsUtils.drawGroove(java.awt.Graphics, int, int, int, int, java.awt.Color, java.awt.Color)

public static void drawGroove(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                              int x,
                              int y,
                              int w,
                              int h,
                              Color sample code for java.awt.Color definition code for java.awt.Color  shadow,
                              Color sample code for java.awt.Color definition code for java.awt.Color  highlight)

getGrooveInsets sample code for javax.swing.plaf.basic.BasicGraphicsUtils.getGrooveInsets() definition code for javax.swing.plaf.basic.BasicGraphicsUtils.getGrooveInsets()

public static Insets sample code for java.awt.Insets definition code for java.awt.Insets  getGrooveInsets()
Returns the amount of space taken up by a border drawn by drawGroove()

Returns:
the inset of a groove border

drawBezel sample code for javax.swing.plaf.basic.BasicGraphicsUtils.drawBezel(java.awt.Graphics, int, int, int, int, boolean, boolean, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color) definition code for javax.swing.plaf.basic.BasicGraphicsUtils.drawBezel(java.awt.Graphics, int, int, int, int, boolean, boolean, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color)

public static void drawBezel(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                             int x,
                             int y,
                             int w,
                             int h,
                             boolean isPressed,
                             boolean isDefault,
                             Color sample code for java.awt.Color definition code for java.awt.Color  shadow,
                             Color sample code for java.awt.Color definition code for java.awt.Color  darkShadow,
                             Color sample code for java.awt.Color definition code for java.awt.Color  highlight,
                             Color sample code for java.awt.Color definition code for java.awt.Color  lightHighlight)

drawLoweredBezel sample code for javax.swing.plaf.basic.BasicGraphicsUtils.drawLoweredBezel(java.awt.Graphics, int, int, int, int, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color) definition code for javax.swing.plaf.basic.BasicGraphicsUtils.drawLoweredBezel(java.awt.Graphics, int, int, int, int, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color)

public static void drawLoweredBezel(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                                    int x,
                                    int y,
                                    int w,
                                    int h,
                                    Color sample code for java.awt.Color definition code for java.awt.Color  shadow,
                                    Color sample code for java.awt.Color definition code for java.awt.Color  darkShadow,
                                    Color sample code for java.awt.Color definition code for java.awt.Color  highlight,
                                    Color sample code for java.awt.Color definition code for java.awt.Color  lightHighlight)

drawString sample code for javax.swing.plaf.basic.BasicGraphicsUtils.drawString(java.awt.Graphics, java.lang.String, int, int, int) definition code for javax.swing.plaf.basic.BasicGraphicsUtils.drawString(java.awt.Graphics, java.lang.String, int, int, int)

public static void drawString(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                              String sample code for java.lang.String definition code for java.lang.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.


drawStringUnderlineCharAt sample code for javax.swing.plaf.basic.BasicGraphicsUtils.drawStringUnderlineCharAt(java.awt.Graphics, java.lang.String, int, int, int) definition code for javax.swing.plaf.basic.BasicGraphicsUtils.drawStringUnderlineCharAt(java.awt.Graphics, java.lang.String, int, int, int)

public static void drawStringUnderlineCharAt(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                                             String sample code for java.lang.String definition code for java.lang.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
Since:
1.4

drawDashedRect sample code for javax.swing.plaf.basic.BasicGraphicsUtils.drawDashedRect(java.awt.Graphics, int, int, int, int) definition code for javax.swing.plaf.basic.BasicGraphicsUtils.drawDashedRect(java.awt.Graphics, int, int, int, int)

public static void drawDashedRect(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                                  int x,
                                  int y,
                                  int width,
                                  int height)

getPreferredButtonSize sample code for javax.swing.plaf.basic.BasicGraphicsUtils.getPreferredButtonSize(javax.swing.AbstractButton, int) definition code for javax.swing.plaf.basic.BasicGraphicsUtils.getPreferredButtonSize(javax.swing.AbstractButton, int)

public static Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getPreferredButtonSize(AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b,
                                               int textIconGap)