javax.swing.plaf

Class BorderUIResource.MatteBorderUIResource

public static class BorderUIResource.MatteBorderUIResource extends MatteBorder implements UIResource, Serializable

A {@link javax.swing.border.MatteBorder} that also implements the {@link UIResource} marker interface. This is useful for implementing pluggable look-and-feels: When switching the current LookAndFeel, only those borders are replaced that are marked as {@link UIResource}. For this reason, a look-and-feel should always install borders that implement UIResource, such as the borders provided by this class.

[An illustration of two MatteBorders]

Constructor Summary
MatteBorderUIResource(int top, int left, int bottom, int right, Color color)
Constructs a MatteBorderUIResource given the width on each side and a fill color.
MatteBorderUIResource(int top, int left, int bottom, int right, Icon tileIcon)
Constructs a MatteBorderUIResource given the width on each side and an icon for tiling the border area.
MatteBorderUIResource(Icon tileIcon)
Constructs a MatteBorderUIResource given an icon for tiling the border area.

Constructor Detail

MatteBorderUIResource

public MatteBorderUIResource(int top, int left, int bottom, int right, Color color)
Constructs a MatteBorderUIResource given the width on each side and a fill color.

[A picture of a MatteBorder made by this
 constructor]

Parameters: top the width of the border at its top edge. left the width of the border at its left edge. bottom the width of the border at its bottom edge. right the width of the border at its right edge. color the color for filling the border.

MatteBorderUIResource

public MatteBorderUIResource(int top, int left, int bottom, int right, Icon tileIcon)
Constructs a MatteBorderUIResource given the width on each side and an icon for tiling the border area.

[A picture of a MatteBorder made by this
 constructor]

Parameters: top the width of the border at its top edge. left the width of the border at its left edge. bottom the width of the border at its bottom edge. right the width of the border at its right edge. tileIcon an icon for tiling the border area.

MatteBorderUIResource

public MatteBorderUIResource(Icon tileIcon)
Constructs a MatteBorderUIResource given an icon for tiling the border area. The icon width is used for the border insets at the left and right edge, the icon height for the top and bottom edge.

[A picture of a MatteBorder made by this
 constructor]

Parameters: tileIcon an icon for tiling the border area.