This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing.plaf.basic
class BasicGraphicsUtils

java.lang.Object extended by javax.swing.plaf.basic.BasicGraphicsUtils

public class BasicGraphicsUtils
extends Object


Constructor Summary

          
 
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 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

          
 
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

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)
Parameters:
g
x
y
w
h
isPressed
isDefault
shadow
darkShadow
highlight
lightHighlight

drawDashedRect

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

drawEtchedRect

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

drawGroove

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

drawLoweredBezel

public static void drawLoweredBezel(Graphics g,
                                    int x,
                                    int y,
                                    int w,
                                    int h,
                                    Color shadow,
                                    Color darkShadow,
                                    Color highlight,
                                    Color lightHighlight)
Parameters:
g
x
y
w
h
shadow
darkShadow
highlight
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 occurrence of underlineChar in text will be underlined. The matching algorithm is not case sensitive.

Parameters:
g
text
underlinedChar
x
y

drawStringUnderlineCharAt

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

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

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

getPreferredButtonSize

public static Dimension getPreferredButtonSize(AbstractButton b,
                                               int textIconGap)
Parameters:
b
textIconGap


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.