javax.swing.plaf.metal
Class MetalBorders.ToolBarBorder

java.lang.Object
  extended by javax.swing.border.AbstractBorder
      extended by javax.swing.plaf.metal.MetalBorders.ToolBarBorder
All Implemented Interfaces:
Serializable, Border, UIResource, SwingConstants
Enclosing class:
MetalBorders

public static class MetalBorders.ToolBarBorder
extends AbstractBorder
implements UIResource, SwingConstants

A border used for the JToolBar component.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Constructor Summary
MetalBorders.ToolBarBorder()
          Creates a new border instance.
 
Method Summary
 Insets getBorderInsets(Component c)
          Returns the border insets.
 Insets getBorderInsets(Component c, Insets newInsets)
          Returns the border insets.
 void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
          Paints the border for the specified 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
 

Constructor Detail

MetalBorders.ToolBarBorder

public MetalBorders.ToolBarBorder()
Creates a new border instance.

Method Detail

getBorderInsets

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

Specified by:
getBorderInsets in interface Border
Overrides:
getBorderInsets in class AbstractBorder
Parameters:
c - the component (ignored).
Returns:
The border insets.
See Also:
AbstractBorder.getBorderInsets(java.awt.Component, java.awt.Insets)

getBorderInsets

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

Overrides:
getBorderInsets in class AbstractBorder
Parameters:
c - the component (ignored).
newInsets - an instance that will be overwritten and returned as the result (null not permitted).
Returns:
The border insets.
See Also:
AbstractBorder.getBorderInsets(Component)

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int w,
                        int h)
Paints the border for the specified component.

Specified by:
paintBorder in interface Border
Overrides:
paintBorder in class AbstractBorder
Parameters:
c - the component.
g - the graphics device.
x - the x-coordinate.
y - the y-coordinate.
w - the width.
h - the height.