javax.swing.plaf
Class BorderUIResource.EtchedBorderUIResource
java.lang.Object
javax.swing.border.AbstractBorder
javax.swing.border.EtchedBorder
javax.swing.plaf.BorderUIResource.EtchedBorderUIResource
- All Implemented Interfaces:
- Serializable, Border, UIResource
- Enclosing class:
- BorderUIResource
public static class BorderUIResource.EtchedBorderUIResource
- extends EtchedBorder
- implements UIResource, Serializable
An 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.
![[An illustration of the two EtchedBorder
variants]](../border/doc-files/EtchedBorder-1.png)
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BorderUIResource.EtchedBorderUIResource
public BorderUIResource.EtchedBorderUIResource()
- Constructs an EtchedBorderUIResource that appears lowered into
the surface. The colors will be derived from the background
color of the enclosed Component when the border gets painted.
BorderUIResource.EtchedBorderUIResource
public BorderUIResource.EtchedBorderUIResource(int etchType)
- Constructs an EtchedBorderUIResource with the specified
appearance. The colors will be derived from the background
color of the enclosed Component when the border gets painted.
![[An illustration of the two
EtchedBorder variants]](../border/doc-files/EtchedBorder-1.png)
- Parameters:
etchType
- the desired appearance of the border. The value
must be either EtchedBorder.RAISED
or EtchedBorder.LOWERED
.
- Throws:
IllegalArgumentException
- if etchType
has
an unsupported value.
BorderUIResource.EtchedBorderUIResource
public BorderUIResource.EtchedBorderUIResource(Color highlight,
Color shadow)
- Constructs a lowered EtchedBorderUIResource, explicitly
selecting the colors that will be used for highlight and
shadow.
- Parameters:
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.- See Also:
EtchedBorderUIResource#EtchedBorderUIResource(int, Color, Color)
BorderUIResource.EtchedBorderUIResource
public 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.
![[An illustration that shows which pixels get
painted in what color]](../border/doc-files/EtchedBorder-2.png)
- Parameters:
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.
- Throws:
IllegalArgumentException
- if etchType
has
an unsupported value.