javax.swing.plaf

Class BorderUIResource.LineBorderUIResource

public static class BorderUIResource.LineBorderUIResource extends LineBorder implements UIResource, Serializable

A {@link javax.swing.border.LineBorder} 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 LineBorders]

Constructor Summary
LineBorderUIResource(Color color)
Constructs a LineBorderUIResource given its color.
LineBorderUIResource(Color color, int thickness)
Constructs a LineBorder given its color and thickness.

Constructor Detail

LineBorderUIResource

public LineBorderUIResource(Color color)
Constructs a LineBorderUIResource given its color. The border will be one pixel thick and have plain corners.

Parameters: color the color for drawing the border.

LineBorderUIResource

public LineBorderUIResource(Color color, int thickness)
Constructs a LineBorder given its color and thickness. The border will have plain corners.

Parameters: color the color for drawing the border. thickness the width of the line in pixels.