APIdia Launch Partner
Top Description Inners Fields Constructors Methods
javax.swing.plaf

public Class BorderUIResource

extends Object
implements Border, UIResource, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, javax.swing.plaf.UIResource, javax.swing.border.Border
Annotations
@SuppressWarnings:serial
Imports
java.awt.Component, .Insets, .Color, .Font, .Graphics, java.io.Serializable, java.beans.ConstructorProperties, javax.swing.border.*, javax.swing.Icon, javax.swing.plaf.UIResource

A Border wrapper class which implements UIResource. UI classes which set border properties should use this class to wrap any borders specified as defaults. This class delegates all method invocations to the Border "delegate" object specified at construction.

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 JavaBeans has been added to the java.beans package. Please see java.beans.XMLEncoder.

Author
Amy Fowler
See Also
javax.swing.plaf.UIResource

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
BorderUIResource.BevelBorderUIResource

A bevel border UI resource.

public static class
BorderUIResource.CompoundBorderUIResource

A compound border UI resource.

public static class
BorderUIResource.EmptyBorderUIResource

An empty border UI resource.

public static class
BorderUIResource.EtchedBorderUIResource

An etched border UI resource.

public static class
BorderUIResource.LineBorderUIResource

A line border UI resource.

public static class
BorderUIResource.MatteBorderUIResource

A matte border UI resource.

public static class
BorderUIResource.TitledBorderUIResource

A titled border UI resource.

Field Summary

Modifier and TypeField and Description
pack-priv static Border
private Border
pack-priv static Border
pack-priv static Border
pack-priv static Border

Constructor Summary

AccessConstructor and Description
public
BorderUIResource(Border
the border being wrapped
delegate
)

Creates a UIResource border object which wraps an existing Border instance.

Method Summary

Modifier and TypeMethod and Description
public static Border

Returns:

a black line border UI resource
getBlackLineBorderUIResource
()

Returns a black line border UI resource.

public Insets
getBorderInsets(Component c)

Implements javax.swing.border.Border.getBorderInsets.

Returns the insets of the border.

public static Border

Returns:

a etched border UI resource
getEtchedBorderUIResource
()

Returns a etched border UI resource.

public static Border

Returns:

a lowered bevel border UI resource
getLoweredBevelBorderUIResource
()

Returns a lowered bevel border UI resource.

public static Border

Returns:

a raised bevel border UI resource
getRaisedBevelBorderUIResource
()

Returns a raised bevel border UI resource.

public boolean
isBorderOpaque()

Implements javax.swing.border.Border.isBorderOpaque.

Returns whether or not the border is opaque.

public void
paintBorder(Component c, Graphics g, int x, int y, int width, int height)

Implements javax.swing.border.Border.paintBorder.

Paints the border for the specified component with the specified position and size.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

blackLineback to summary
pack-priv static Border blackLine
delegateback to summary
private Border delegate
etchedback to summary
pack-priv static Border etched
loweredBevelback to summary
pack-priv static Border loweredBevel
raisedBevelback to summary
pack-priv static Border raisedBevel

Constructor Detail

BorderUIResourceback to summary
public BorderUIResource(Border delegate)

Creates a UIResource border object which wraps an existing Border instance.

Parameters
delegate:Border

the border being wrapped

Method Detail

getBlackLineBorderUIResourceback to summary
public static Border getBlackLineBorderUIResource()

Returns a black line border UI resource.

Returns:Border

a black line border UI resource

getBorderInsetsback to summary
public Insets getBorderInsets(Component c)

Implements javax.swing.border.Border.getBorderInsets.

Doc from javax.swing.border.Border.getBorderInsets.

Returns the insets of the border.

getEtchedBorderUIResourceback to summary
public static Border getEtchedBorderUIResource()

Returns a etched border UI resource.

Returns:Border

a etched border UI resource

getLoweredBevelBorderUIResourceback to summary
public static Border getLoweredBevelBorderUIResource()

Returns a lowered bevel border UI resource.

Returns:Border

a lowered bevel border UI resource

getRaisedBevelBorderUIResourceback to summary
public static Border getRaisedBevelBorderUIResource()

Returns a raised bevel border UI resource.

Returns:Border

a raised bevel border UI resource

isBorderOpaqueback to summary
public boolean isBorderOpaque()

Implements javax.swing.border.Border.isBorderOpaque.

Doc from javax.swing.border.Border.isBorderOpaque.

Returns whether or not the border is opaque. If the border is opaque, it is responsible for filling in it's own background when painting.

paintBorderback to summary
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)

Implements javax.swing.border.Border.paintBorder.

Doc from javax.swing.border.Border.paintBorder.

Paints the border for the specified component with the specified position and size.

javax.swing.plaf back to summary

public Class BorderUIResource.BevelBorderUIResource

extends BevelBorder
implements UIResource
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.UIResource

A bevel border UI resource.

Field Summary

Inherited from javax.swing.border.BevelBorder:
bevelTypehighlightInnerhighlightOuterLOWEREDRAISEDshadowInnershadowOuter

Constructor Summary

AccessConstructor and Description
public
BevelBorderUIResource(int
the type of bevel for the border
bevelType
)

Constructs a BevelBorderUIResource.

public
BevelBorderUIResource(int
the type of bevel for the border
bevelType
,
Color
the color to use for the bevel highlight
highlight
,
Color
the color to use for the bevel shadow
shadow
)

Constructs a BevelBorderUIResource.

public
BevelBorderUIResource(int
the type of bevel for the border
bevelType
,
Color
the color to use for the bevel outer highlight
highlightOuter
,
Color
the color to use for the bevel inner highlight
highlightInner
,
Color
the color to use for the bevel outer shadow
shadowOuter
,
Color
the color to use for the bevel inner shadow
shadowInner
)

Constructs a BevelBorderUIResource.

Method Summary

Inherited from javax.swing.border.BevelBorder:
getBevelTypegetBorderInsetsgetHighlightInnerColorgetHighlightInnerColorgetHighlightOuterColorgetHighlightOuterColorgetShadowInnerColorgetShadowInnerColorgetShadowOuterColorgetShadowOuterColorisBorderOpaquepaintBorderpaintLoweredBevelpaintRaisedBevel

Constructor Detail

BevelBorderUIResourceback to summary
public BevelBorderUIResource(int bevelType)

Constructs a BevelBorderUIResource.

Parameters
bevelType:int

the type of bevel for the border

BevelBorderUIResourceback to summary
public BevelBorderUIResource(int bevelType, Color highlight, Color shadow)

Constructs a BevelBorderUIResource. The bevel outer highlight color and bevel inner highlight color will be derived from specified highlight color and bevel outer shadow color and bevel inner shadow color will be derived from specified shadow color.

Parameters
bevelType:int

the type of bevel for the border

highlight:Color

the color to use for the bevel highlight

shadow:Color

the color to use for the bevel shadow

BevelBorderUIResourceback to summary
public BevelBorderUIResource(int bevelType, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner)

Constructs a BevelBorderUIResource.

Parameters
bevelType:int

the type of bevel for the border

highlightOuter:Color

the color to use for the bevel outer highlight

highlightInner:Color

the color to use for the bevel inner highlight

shadowOuter:Color

the color to use for the bevel outer shadow

shadowInner:Color

the color to use for the bevel inner shadow

Annotations
@ConstructorProperties:bevelType, highlightOuterColor, highlightInnerColor, shadowOuterColor, shadowInnerColor
javax.swing.plaf back to summary

public Class BorderUIResource.CompoundBorderUIResource

extends CompoundBorder
implements UIResource
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.UIResource

A compound border UI resource.

Field Summary

Inherited from javax.swing.border.CompoundBorder:
insideBorderoutsideBorder

Constructor Summary

AccessConstructor and Description
public
CompoundBorderUIResource(Border
the outside border
outsideBorder
,
Border
the inside border
insideBorder
)

Constructs a CompoundBorderUIResource.

Method Summary

Inherited from javax.swing.border.CompoundBorder:
getBorderInsetsgetInsideBordergetOutsideBorderisBorderOpaquepaintBorder

Constructor Detail

CompoundBorderUIResourceback to summary
public CompoundBorderUIResource(Border outsideBorder, Border insideBorder)

Constructs a CompoundBorderUIResource.

Parameters
outsideBorder:Border

the outside border

insideBorder:Border

the inside border

Annotations
@ConstructorProperties:outsideBorder, insideBorder
javax.swing.plaf back to summary

public Class BorderUIResource.EmptyBorderUIResource

extends EmptyBorder
implements UIResource
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.UIResource

An empty border UI resource.

Field Summary

Inherited from javax.swing.border.EmptyBorder:
bottomleftrighttop

Constructor Summary

AccessConstructor and Description
public
EmptyBorderUIResource(int
the top inset of the border
top
,
int
the left inset of the border
left
,
int
the bottom inset of the border
bottom
,
int
the right inset of the border
right
)

Constructs an EmptyBorderUIResource.

public
EmptyBorderUIResource(Insets
the insets of the border
insets
)

Constructs an EmptyBorderUIResource.

Method Summary

Inherited from javax.swing.border.EmptyBorder:
getBorderInsetsgetBorderInsetsisBorderOpaquepaintBorder

Constructor Detail

EmptyBorderUIResourceback to summary
public EmptyBorderUIResource(int top, int left, int bottom, int right)

Constructs an EmptyBorderUIResource.

Parameters
top:int

the top inset of the border

left:int

the left inset of the border

bottom:int

the bottom inset of the border

right:int

the right inset of the border

EmptyBorderUIResourceback to summary
public EmptyBorderUIResource(Insets insets)

Constructs an EmptyBorderUIResource.

Parameters
insets:Insets

the insets of the border

Annotations
@ConstructorProperties:borderInsets
Exceptions
NullPointerException:
if the specified insets is null
javax.swing.plaf back to summary

public Class BorderUIResource.EtchedBorderUIResource

extends EtchedBorder
implements UIResource
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.UIResource

An etched border UI resource.

Field Summary

Inherited from javax.swing.border.EtchedBorder:
etchTypehighlightLOWEREDRAISEDshadow

Constructor Summary

AccessConstructor and Description
public
EtchedBorderUIResource()

Constructs an EtchedBorderUIResource.

public
EtchedBorderUIResource(int
the type of etch to be drawn by the border
etchType
)

Constructs an EtchedBorderUIResource.

public
EtchedBorderUIResource(Color
the color to use for the etched highlight
highlight
,
Color
the color to use for the etched shadow
shadow
)

Constructs an EtchedBorderUIResource.

public
EtchedBorderUIResource(int
the type of etch to be drawn by the border
etchType
,
Color
the color to use for the etched highlight
highlight
,
Color
the color to use for the etched shadow
shadow
)

Constructs an EtchedBorderUIResource.

Method Summary

Inherited from javax.swing.border.EtchedBorder:
getBorderInsetsgetEtchTypegetHighlightColorgetHighlightColorgetShadowColorgetShadowColorisBorderOpaquepaintBorder

Constructor Detail

EtchedBorderUIResourceback to summary
public EtchedBorderUIResource()

Constructs an EtchedBorderUIResource.

EtchedBorderUIResourceback to summary
public EtchedBorderUIResource(int etchType)

Constructs an EtchedBorderUIResource.

Parameters
etchType:int

the type of etch to be drawn by the border

EtchedBorderUIResourceback to summary
public EtchedBorderUIResource(Color highlight, Color shadow)

Constructs an EtchedBorderUIResource.

Parameters
highlight:Color

the color to use for the etched highlight

shadow:Color

the color to use for the etched shadow

EtchedBorderUIResourceback to summary
public EtchedBorderUIResource(int etchType, Color highlight, Color shadow)

Constructs an EtchedBorderUIResource.

Parameters
etchType:int

the type of etch to be drawn by the border

highlight:Color

the color to use for the etched highlight

shadow:Color

the color to use for the etched shadow

Annotations
@ConstructorProperties:etchType, highlightColor, shadowColor
javax.swing.plaf back to summary

public Class BorderUIResource.LineBorderUIResource

extends LineBorder
implements UIResource
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.UIResource

A line border UI resource.

Field Summary

Inherited from javax.swing.border.LineBorder:
lineColorroundedCornersthickness

Constructor Summary

AccessConstructor and Description
public
LineBorderUIResource(Color
the color for the border
color
)

Constructs a LineBorderUIResource.

public
LineBorderUIResource(Color
the color for the border
color
,
int
the thickness of the border
thickness
)

Constructs a LineBorderUIResource.

Method Summary

Inherited from javax.swing.border.LineBorder:
createBlackLineBordercreateGrayLineBordergetBorderInsetsgetLineColorgetRoundedCornersgetThicknessisBorderOpaquepaintBorder

Constructor Detail

LineBorderUIResourceback to summary
public LineBorderUIResource(Color color)

Constructs a LineBorderUIResource.

Parameters
color:Color

the color for the border

LineBorderUIResourceback to summary
public LineBorderUIResource(Color color, int thickness)

Constructs a LineBorderUIResource.

Parameters
color:Color

the color for the border

thickness:int

the thickness of the border

Annotations
@ConstructorProperties:lineColor, thickness
javax.swing.plaf back to summary

public Class BorderUIResource.MatteBorderUIResource

extends MatteBorder
implements UIResource
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.UIResource

A matte border UI resource.

Field Summary

Inherited from javax.swing.border.MatteBorder:
colortileIcon

Constructor Summary

AccessConstructor and Description
public
MatteBorderUIResource(int
the top inset of the border
top
,
int
the left inset of the border
left
,
int
the bottom inset of the border
bottom
,
int
the right inset of the border
right
,
Color
the color rendered for the border
color
)

Constructs a MatteBorderUIResource.

public
MatteBorderUIResource(int
the top inset of the border
top
,
int
the left inset of the border
left
,
int
the bottom inset of the border
bottom
,
int
the right inset of the border
right
,
Icon
the icon to be used for tiling the border
tileIcon
)

Constructs a MatteBorderUIResource.

public
MatteBorderUIResource(Icon
the icon to be used for tiling the border
tileIcon
)

Constructs a MatteBorderUIResource.

Method Summary

Inherited from javax.swing.border.MatteBorder:
getBorderInsetsgetBorderInsetsgetMatteColorgetTileIconisBorderOpaquepaintBorder

Constructor Detail

MatteBorderUIResourceback to summary
public MatteBorderUIResource(int top, int left, int bottom, int right, Color color)

Constructs a MatteBorderUIResource.

Parameters
top:int

the top inset of the border

left:int

the left inset of the border

bottom:int

the bottom inset of the border

right:int

the right inset of the border

color:Color

the color rendered for the border

MatteBorderUIResourceback to summary
public MatteBorderUIResource(int top, int left, int bottom, int right, Icon tileIcon)

Constructs a MatteBorderUIResource.

Parameters
top:int

the top inset of the border

left:int

the left inset of the border

bottom:int

the bottom inset of the border

right:int

the right inset of the border

tileIcon:Icon

the icon to be used for tiling the border

MatteBorderUIResourceback to summary
public MatteBorderUIResource(Icon tileIcon)

Constructs a MatteBorderUIResource.

Parameters
tileIcon:Icon

the icon to be used for tiling the border

javax.swing.plaf back to summary

public Class BorderUIResource.TitledBorderUIResource

extends TitledBorder
implements UIResource
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.UIResource

A titled border UI resource.

Field Summary

Inherited from javax.swing.border.TitledBorder:
ABOVE_BOTTOMABOVE_TOPBELOW_BOTTOMBELOW_TOPborderBOTTOMCENTERDEFAULT_JUSTIFICATIONDEFAULT_POSITIONEDGE_SPACINGLEADINGLEFTRIGHTTEXT_INSET_HTEXT_SPACINGtitletitleColortitleFonttitleJustificationtitlePositionTOPTRAILING

Constructor Summary

AccessConstructor and Description
public
TitledBorderUIResource(String
the title the border should display
title
)

Constructs a TitledBorderUIResource.

public
TitledBorderUIResource(Border
the border
border
)

Constructs a TitledBorderUIResource.

public
TitledBorderUIResource(Border
the border
border
,
String
the title the border should display
title
)

Constructs a TitledBorderUIResource.

public
TitledBorderUIResource(Border
the border
border
,
String
the title the border should display
title
,
int
the justification for the title
titleJustification
,
int
the position for the title
titlePosition
)

Constructs a TitledBorderUIResource.

public
TitledBorderUIResource(Border
the border
border
,
String
the title the border should display
title
,
int
the justification for the title
titleJustification
,
int
the position for the title
titlePosition
,
Font
the font for rendering the title
titleFont
)

Constructs a TitledBorderUIResource.

public
TitledBorderUIResource(Border
the border
border
,
String
the title the border should display
title
,
int
the justification for the title
titleJustification
,
int
the position for the title
titlePosition
,
Font
the font for rendering the title
titleFont
,
Color
the color of the title
titleColor
)

Constructs a TitledBorderUIResource.

Method Summary

Inherited from javax.swing.border.TitledBorder:
getBaselinegetBaselineResizeBehaviorgetBordergetBorderInsetsgetFontgetMinimumSizegetTitlegetTitleColorgetTitleFontgetTitleJustificationgetTitlePositionisBorderOpaquepaintBordersetBordersetTitlesetTitleColorsetTitleFontsetTitleJustificationsetTitlePosition

Constructor Detail

TitledBorderUIResourceback to summary
public TitledBorderUIResource(String title)

Constructs a TitledBorderUIResource.

Parameters
title:String

the title the border should display

TitledBorderUIResourceback to summary
public TitledBorderUIResource(Border border)

Constructs a TitledBorderUIResource.

Parameters
border:Border

the border

TitledBorderUIResourceback to summary
public TitledBorderUIResource(Border border, String title)

Constructs a TitledBorderUIResource.

Parameters
border:Border

the border

title:String

the title the border should display

TitledBorderUIResourceback to summary
public TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition)

Constructs a TitledBorderUIResource.

Parameters
border:Border

the border

title:String

the title the border should display

titleJustification:int

the justification for the title

titlePosition:int

the position for the title

TitledBorderUIResourceback to summary
public TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont)

Constructs a TitledBorderUIResource.

Parameters
border:Border

the border

title:String

the title the border should display

titleJustification:int

the justification for the title

titlePosition:int

the position for the title

titleFont:Font

the font for rendering the title

TitledBorderUIResourceback to summary
public TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)

Constructs a TitledBorderUIResource.

Parameters
border:Border

the border

title:String

the title the border should display

titleJustification:int

the justification for the title

titlePosition:int

the position for the title

titleFont:Font

the font for rendering the title

titleColor:Color

the color of the title

Annotations
@ConstructorProperties:border, title, titleJustification, titlePosition, titleFont, titleColor