dsto.dfc.swing.controls
Class EtchedDividingBorder

java.lang.Object
  extended by javax.swing.border.AbstractBorder
      extended by javax.swing.border.EtchedBorder
          extended by dsto.dfc.swing.controls.EtchedDividingBorder
All Implemented Interfaces:
Serializable, Border

public class EtchedDividingBorder
extends EtchedBorder

A border that draws an etched line at the bottom of the component. Useful to display a dividing line between components.

Version:
$Revision$
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.border.EtchedBorder
etchType, highlight, LOWERED, RAISED, shadow
 
Constructor Summary
EtchedDividingBorder()
          Creates a lowered etched border whose colors will be derived from the background color of the component passed into the paintBorder method.
EtchedDividingBorder(Color highlight, Color shadow)
          Creates a lowered etched border with the specified highlight and shadow colors.
EtchedDividingBorder(int etchType)
          Creates an etched border with the specified etch-type whose colors will be derived from the background color of the component passed into the paintBorder method.
EtchedDividingBorder(int etchType, Color highlight, Color shadow)
          Creates an etched border with the specified etch-type, highlight and shadow colors.
 
Method Summary
 Insets getBorderInsets(Component c)
          Returns the insets of the border.
 void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
          Paints the border for the specified component with the specified position and size.
 
Methods inherited from class javax.swing.border.EtchedBorder
getBorderInsets, getEtchType, getHighlightColor, getHighlightColor, getShadowColor, getShadowColor, isBorderOpaque
 
Methods inherited from class javax.swing.border.AbstractBorder
getBaseline, getBaselineResizeBehavior, getInteriorRectangle, getInteriorRectangle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EtchedDividingBorder

public EtchedDividingBorder()
Creates a lowered etched border whose colors will be derived from the background color of the component passed into the paintBorder method.


EtchedDividingBorder

public EtchedDividingBorder(int etchType)
Creates an etched border with the specified etch-type whose colors will be derived from the background color of the component passed into the paintBorder method.

Parameters:
etchType - the type of etch to be drawn by the border

EtchedDividingBorder

public EtchedDividingBorder(Color highlight,
                            Color shadow)
Creates a lowered etched border with the specified highlight and shadow colors.

Parameters:
highlight - the color to use for the etched highlight
shadow - the color to use for the etched shadow

EtchedDividingBorder

public EtchedDividingBorder(int etchType,
                            Color highlight,
                            Color shadow)
Creates an etched border with the specified etch-type, highlight and shadow colors.

Parameters:
etchType - the type of etch to be drawn by the border
highlight - the color to use for the etched highlight
shadow - the color to use for the etched shadow
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Paints the border for the specified component with the specified position and size.

Specified by:
paintBorder in interface Border
Overrides:
paintBorder in class EtchedBorder
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Returns the insets of the border.

Specified by:
getBorderInsets in interface Border
Overrides:
getBorderInsets in class EtchedBorder
Parameters:
c - the component for which this border insets value applies


Copyright © 2008 Commonwealth of Australia