javax.swing.plaf
public static class BorderUIResource.EtchedBorderUIResource extends EtchedBorder implements UIResource, Serializable
EtchedBorder
that also implements the
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
UIResource
. For this reason, a look-and-feel should
always install borders that implement UIResource
,
such as the borders provided by this class.
Constructor and Description |
---|
BorderUIResource.EtchedBorderUIResource()
Constructs an EtchedBorderUIResource that appears lowered into
the surface.
|
BorderUIResource.EtchedBorderUIResource(Color highlight,
Color shadow)
Constructs a lowered EtchedBorderUIResource, explicitly
selecting the colors that will be used for highlight and
shadow.
|
BorderUIResource.EtchedBorderUIResource(int etchType)
Constructs an EtchedBorderUIResource with the specified
appearance.
|
BorderUIResource.EtchedBorderUIResource(int etchType,
Color highlight,
Color shadow)
Constructs an EtchedBorderUIResource with the specified
appearance, explicitly selecting the colors that will be used
for highlight and shadow.
|
getBorderInsets, getBorderInsets, getEtchType, getHighlightColor, getHighlightColor, getShadowColor, getShadowColor, isBorderOpaque, paintBorder
getInteriorRectangle, getInteriorRectangle
public BorderUIResource.EtchedBorderUIResource()
public BorderUIResource.EtchedBorderUIResource(int etchType)
etchType
- the desired appearance of the border. The value
must be either EtchedBorder.RAISED
or EtchedBorder.LOWERED
.IllegalArgumentException
- if etchType
has
an unsupported value.public BorderUIResource.EtchedBorderUIResource(Color highlight, Color shadow)
highlight
- the color that will be used for painting
the highlight part of the border.shadow
- the color that will be used for painting
the shadow part of the border.EtchedBorderUIResource#EtchedBorderUIResource(int, Color, Color)
public BorderUIResource.EtchedBorderUIResource(int etchType, Color highlight, Color shadow)
etchType
- the desired appearance of the border. The value
must be either EtchedBorder.RAISED
or EtchedBorder.LOWERED
.highlight
- the color that will be used for painting
the highlight part of the border.shadow
- the color that will be used for painting
the shadow part of the border.IllegalArgumentException
- if etchType
has
an unsupported value.