Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.swing.plaf.basic
Class BasicBorders.ButtonBorder  view BasicBorders.ButtonBorder download BasicBorders.ButtonBorder.java

java.lang.Object
  extended byjavax.swing.border.AbstractBorder
      extended byjavax.swing.plaf.basic.BasicBorders.ButtonBorder
All Implemented Interfaces:
javax.swing.border.Border, java.io.Serializable, javax.swing.plaf.UIResource
Direct Known Subclasses:
BasicBorders.RadioButtonBorder, BasicBorders.RolloverButtonBorder, BasicBorders.ToggleButtonBorder
Enclosing class:
BasicBorders

public static class BasicBorders.ButtonBorder
extends javax.swing.border.AbstractBorder
implements java.io.Serializable, javax.swing.plaf.UIResource

A border whose appearance depends on the state of the enclosed button.

[A screen shot of this border]


Field Summary
protected  java.awt.Color darkShadow
          The color for drawing the dark shaded parts of the border.
protected  java.awt.Color highlight
          The color for drawing the highlighted parts of the border.
protected  java.awt.Color lightHighlight
          The color for drawing the bright highlighted parts of the border.
(package private) static long serialVersionUID
          Determined using the serialver tool of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5.
protected  java.awt.Color shadow
          The color for drawing the shaded parts of the border.
 
Constructor Summary
BasicBorders.ButtonBorder(java.awt.Color shadow, java.awt.Color darkShadow, java.awt.Color highlight, java.awt.Color lightHighlight)
          Constructs a new border for drawing a button in the Basic look and feel.
 
Method Summary
 java.awt.Insets getBorderInsets(java.awt.Component c)
          Measures the width of this border.
 java.awt.Insets getBorderInsets(java.awt.Component c, java.awt.Insets insets)
          Measures the width of this border, storing the results into a pre-existing Insets object.
 void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
          Paints the ButtonBorder around a given component.
 
Methods inherited from class javax.swing.border.AbstractBorder
getInteriorRectangle, getInteriorRectangle, isBorderOpaque
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
Determined using the serialver tool of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5.

See Also:
Constant Field Values

shadow

protected java.awt.Color shadow
The color for drawing the shaded parts of the border.

See Also:
BasicGraphicsUtils.drawBezel(java.awt.Graphics, int, int, int, int, boolean, boolean, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color) 55

darkShadow

protected java.awt.Color darkShadow
The color for drawing the dark shaded parts of the border.

See Also:
BasicGraphicsUtils.drawBezel(java.awt.Graphics, int, int, int, int, boolean, boolean, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color) 55

highlight

protected java.awt.Color highlight
The color for drawing the highlighted parts of the border.

See Also:
BasicGraphicsUtils.drawBezel(java.awt.Graphics, int, int, int, int, boolean, boolean, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color) 55

lightHighlight

protected java.awt.Color lightHighlight
The color for drawing the bright highlighted parts of the border.

See Also:
BasicGraphicsUtils.drawBezel(java.awt.Graphics, int, int, int, int, boolean, boolean, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color) 55
Constructor Detail

BasicBorders.ButtonBorder

public BasicBorders.ButtonBorder(java.awt.Color shadow,
                                 java.awt.Color darkShadow,
                                 java.awt.Color highlight,
                                 java.awt.Color lightHighlight)
Constructs a new border for drawing a button in the Basic look and feel.

Method Detail

paintBorder

public void paintBorder(java.awt.Component c,
                        java.awt.Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Paints the ButtonBorder around a given component.

Specified by:
paintBorder in interface javax.swing.border.Border

getBorderInsets

public java.awt.Insets getBorderInsets(java.awt.Component c)
Measures the width of this border.

Although the thickness of the actually painted border depends on the state of the enclosed component, this measurement always returns the same amount of pixels. Indeed, it would be rather confusing if a button was appearing to change its size depending on whether it is pressed or not.

Specified by:
getBorderInsets in interface javax.swing.border.Border

getBorderInsets

public java.awt.Insets getBorderInsets(java.awt.Component c,
                                       java.awt.Insets insets)
Measures the width of this border, storing the results into a pre-existing Insets object.

Although the thickness of the actually painted border depends on the state of the enclosed component, this measurement always returns the same amount of pixels. Indeed, it would be rather confusing if a button was appearing to change its size depending on whether it is pressed or not.