javax.swing.border
Class AbstractBorder

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.border.AbstractBorder
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border
Direct Known Subclasses:
BasicBorders.ButtonBorder sample code for javax.swing.plaf.basic.BasicBorders.ButtonBorder definition code for javax.swing.plaf.basic.BasicBorders.ButtonBorder , BasicBorders.FieldBorder sample code for javax.swing.plaf.basic.BasicBorders.FieldBorder definition code for javax.swing.plaf.basic.BasicBorders.FieldBorder , BasicBorders.MarginBorder sample code for javax.swing.plaf.basic.BasicBorders.MarginBorder definition code for javax.swing.plaf.basic.BasicBorders.MarginBorder , BasicBorders.MenuBarBorder sample code for javax.swing.plaf.basic.BasicBorders.MenuBarBorder definition code for javax.swing.plaf.basic.BasicBorders.MenuBarBorder , BevelBorder sample code for javax.swing.border.BevelBorder definition code for javax.swing.border.BevelBorder , CompoundBorder sample code for javax.swing.border.CompoundBorder definition code for javax.swing.border.CompoundBorder , EmptyBorder sample code for javax.swing.border.EmptyBorder definition code for javax.swing.border.EmptyBorder , EtchedBorder sample code for javax.swing.border.EtchedBorder definition code for javax.swing.border.EtchedBorder , LineBorder sample code for javax.swing.border.LineBorder definition code for javax.swing.border.LineBorder , MetalBorders.ButtonBorder sample code for javax.swing.plaf.metal.MetalBorders.ButtonBorder definition code for javax.swing.plaf.metal.MetalBorders.ButtonBorder , MetalBorders.Flush3DBorder sample code for javax.swing.plaf.metal.MetalBorders.Flush3DBorder definition code for javax.swing.plaf.metal.MetalBorders.Flush3DBorder , MetalBorders.InternalFrameBorder sample code for javax.swing.plaf.metal.MetalBorders.InternalFrameBorder definition code for javax.swing.plaf.metal.MetalBorders.InternalFrameBorder , MetalBorders.MenuBarBorder sample code for javax.swing.plaf.metal.MetalBorders.MenuBarBorder definition code for javax.swing.plaf.metal.MetalBorders.MenuBarBorder , MetalBorders.MenuItemBorder sample code for javax.swing.plaf.metal.MetalBorders.MenuItemBorder definition code for javax.swing.plaf.metal.MetalBorders.MenuItemBorder , MetalBorders.OptionDialogBorder sample code for javax.swing.plaf.metal.MetalBorders.OptionDialogBorder definition code for javax.swing.plaf.metal.MetalBorders.OptionDialogBorder , MetalBorders.PaletteBorder sample code for javax.swing.plaf.metal.MetalBorders.PaletteBorder definition code for javax.swing.plaf.metal.MetalBorders.PaletteBorder , MetalBorders.PopupMenuBorder sample code for javax.swing.plaf.metal.MetalBorders.PopupMenuBorder definition code for javax.swing.plaf.metal.MetalBorders.PopupMenuBorder , MetalBorders.ScrollPaneBorder sample code for javax.swing.plaf.metal.MetalBorders.ScrollPaneBorder definition code for javax.swing.plaf.metal.MetalBorders.ScrollPaneBorder , MetalBorders.TableHeaderBorder sample code for javax.swing.plaf.metal.MetalBorders.TableHeaderBorder definition code for javax.swing.plaf.metal.MetalBorders.TableHeaderBorder , MetalBorders.ToolBarBorder sample code for javax.swing.plaf.metal.MetalBorders.ToolBarBorder definition code for javax.swing.plaf.metal.MetalBorders.ToolBarBorder , TitledBorder sample code for javax.swing.border.TitledBorder definition code for javax.swing.border.TitledBorder

public abstract class AbstractBorder
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border , Serializable sample code for java.io.Serializable definition code for java.io.Serializable

A class that implements an empty border with no size. This provides a convenient base class from which other border classes can be easily derived.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder sample code for java.beans.XMLEncoder definition code for java.beans.XMLEncoder .

See Also:
Serialized Form

Constructor Summary
AbstractBorder sample code for javax.swing.border.AbstractBorder.AbstractBorder() definition code for javax.swing.border.AbstractBorder.AbstractBorder() ()
           
 
Method Summary
 Insets sample code for java.awt.Insets definition code for java.awt.Insets getBorderInsets sample code for javax.swing.border.AbstractBorder.getBorderInsets(java.awt.Component) definition code for javax.swing.border.AbstractBorder.getBorderInsets(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  c)
          This default implementation returns a new Insets instance where the top, left, bottom, and right fields are set to 0.
 Insets sample code for java.awt.Insets definition code for java.awt.Insets getBorderInsets sample code for javax.swing.border.AbstractBorder.getBorderInsets(java.awt.Component, java.awt.Insets) definition code for javax.swing.border.AbstractBorder.getBorderInsets(java.awt.Component, java.awt.Insets) (Component sample code for java.awt.Component definition code for java.awt.Component  c, Insets sample code for java.awt.Insets definition code for java.awt.Insets  insets)
          Reinitializes the insets parameter with this Border's current Insets.
static Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle getInteriorRectangle sample code for javax.swing.border.AbstractBorder.getInteriorRectangle(java.awt.Component, javax.swing.border.Border, int, int, int, int) definition code for javax.swing.border.AbstractBorder.getInteriorRectangle(java.awt.Component, javax.swing.border.Border, int, int, int, int) (Component sample code for java.awt.Component definition code for java.awt.Component  c, Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border  b, int x, int y, int width, int height)
          Returns a rectangle using the arguments minus the insets of the border.
 Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle getInteriorRectangle sample code for javax.swing.border.AbstractBorder.getInteriorRectangle(java.awt.Component, int, int, int, int) definition code for javax.swing.border.AbstractBorder.getInteriorRectangle(java.awt.Component, int, int, int, int) (Component sample code for java.awt.Component definition code for java.awt.Component  c, int x, int y, int width, int height)
          This convenience method calls the static method.
 boolean isBorderOpaque sample code for javax.swing.border.AbstractBorder.isBorderOpaque() definition code for javax.swing.border.AbstractBorder.isBorderOpaque() ()
          This default implementation returns false.
 void paintBorder sample code for javax.swing.border.AbstractBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int) definition code for javax.swing.border.AbstractBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int) (Component sample code for java.awt.Component definition code for java.awt.Component  c, Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, int x, int y, int width, int height)
          This default implementation does no painting.
 
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

AbstractBorder sample code for javax.swing.border.AbstractBorder() definition code for javax.swing.border.AbstractBorder()

public AbstractBorder()
Method Detail

paintBorder sample code for javax.swing.border.AbstractBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int) definition code for javax.swing.border.AbstractBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)

public void paintBorder(Component sample code for java.awt.Component definition code for java.awt.Component  c,
                        Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                        int x,
                        int y,
                        int width,
                        int height)
This default implementation does no painting.

Specified by:
paintBorder sample code for javax.swing.border.Border.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int) definition code for javax.swing.border.Border.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int) in interface Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border
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 sample code for javax.swing.border.AbstractBorder.getBorderInsets(java.awt.Component) definition code for javax.swing.border.AbstractBorder.getBorderInsets(java.awt.Component)

public Insets sample code for java.awt.Insets definition code for java.awt.Insets  getBorderInsets(Component sample code for java.awt.Component definition code for java.awt.Component  c)
This default implementation returns a new Insets instance where the top, left, bottom, and right fields are set to 0.

Specified by:
getBorderInsets sample code for javax.swing.border.Border.getBorderInsets(java.awt.Component) definition code for javax.swing.border.Border.getBorderInsets(java.awt.Component) in interface Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies
Returns:
the new Insets object initialized to 0

getBorderInsets sample code for javax.swing.border.AbstractBorder.getBorderInsets(java.awt.Component, java.awt.Insets) definition code for javax.swing.border.AbstractBorder.getBorderInsets(java.awt.Component, java.awt.Insets)

public Insets sample code for java.awt.Insets definition code for java.awt.Insets  getBorderInsets(Component sample code for java.awt.Component definition code for java.awt.Component  c,
                              Insets sample code for java.awt.Insets definition code for java.awt.Insets  insets)
Reinitializes the insets parameter with this Border's current Insets.

Parameters:
c - the component for which this border insets value applies
insets - the object to be reinitialized
Returns:
the insets object

isBorderOpaque sample code for javax.swing.border.AbstractBorder.isBorderOpaque() definition code for javax.swing.border.AbstractBorder.isBorderOpaque()

public boolean isBorderOpaque()
This default implementation returns false.

Specified by:
isBorderOpaque sample code for javax.swing.border.Border.isBorderOpaque() definition code for javax.swing.border.Border.isBorderOpaque() in interface Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border
Returns:
false

getInteriorRectangle sample code for javax.swing.border.AbstractBorder.getInteriorRectangle(java.awt.Component, int, int, int, int) definition code for javax.swing.border.AbstractBorder.getInteriorRectangle(java.awt.Component, int, int, int, int)

public Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  getInteriorRectangle(Component sample code for java.awt.Component definition code for java.awt.Component  c,
                                      int x,
                                      int y,
                                      int width,
                                      int height)
This convenience method calls the static method.

Parameters:
c - the component for which this border is being computed
x - the x position of the border
y - the y position of the border
width - the width of the border
height - the height of the border
Returns:
a Rectangle containing the interior coordinates

getInteriorRectangle sample code for javax.swing.border.AbstractBorder.getInteriorRectangle(java.awt.Component, javax.swing.border.Border, int, int, int, int) definition code for javax.swing.border.AbstractBorder.getInteriorRectangle(java.awt.Component, javax.swing.border.Border, int, int, int, int)

public static Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  getInteriorRectangle(Component sample code for java.awt.Component definition code for java.awt.Component  c,
                                             Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border  b,
                                             int x,
                                             int y,
                                             int width,
                                             int height)
Returns a rectangle using the arguments minus the insets of the border. This is useful for determining the area that components should draw in that will not intersect the border.

Parameters:
c - the component for which this border is being computed
b - the Border object
x - the x position of the border
y - the y position of the border
width - the width of the border
height - the height of the border
Returns:
a Rectangle containing the interior coordinates