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..
| Modifier and Type | Field and Description |
|---|---|
| protected int | etchType
The type of etch to be drawn by the border. |
| protected Color | highlight
The color to use for the etched highlight. |
| public static final int | LOWERED
Lowered etched type. |
| public static final int | RAISED
Raised etched type. |
| protected Color | shadow
The color to use for the etched shadow. |
| Access | Constructor and Description |
|---|---|
| public | EtchedBorder()
Creates a lowered etched border whose colors will be derived from the background color of the component passed into the paintBorder method. |
| public | EtchedBorder(int
the type of etch to be drawn by the border etchType)Creates an etched border with the specified etch-type whose colors will be derived from the background color of the component passed into the paintBorder method. |
| public | EtchedBorder(Color
the color to use for the etched highlight highlight, Color the color to use for the etched shadow shadow)Creates a lowered etched border with the specified highlight and shadow colors. |
| public | EtchedBorder(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)Creates an etched border with the specified etch-type, highlight and shadow colors. |
| Modifier and Type | Method and Description |
|---|---|
| public Insets | getBorderInsets(Component
the component for which this border insets value applies c, Insets the object to be reinitialized insets)Overrides javax. Reinitialize the insets parameter with this Border's current Insets. |
| public int | Returns: the etched border type, eitherRAISED or LOWEREDReturns which etch-type is set on the etched border. |
| public Color | Returns: the highlightColor of this EtchedBorderthe component for which the highlight may be derived c)Returns the highlight color of the etched border when rendered on the specified component. |
| public Color | Returns: the highlightColor of this EtchedBorder or null
if none was specifiedReturns the highlight color of the etched border. |
| public Color | Returns: the shadowColor of this EtchedBorderthe component for which the shadow may be derived c)Returns the shadow color of the etched border when rendered on the specified component. |
| public Color | Returns: the shadowColor of this EtchedBorder or null
if none was specifiedReturns the shadow color of the etched border. |
| public boolean | Returns: trueOverrides javax. Implements javax. Returns whether or not the border is opaque. |
| public void | paintBorder(Component
the component for which this border is being painted c, Graphics the paint graphics g, int the x position of the painted border x, int the y position of the painted border y, int the width of the painted border width, int the height of the painted border height)Overrides javax. Implements javax. Paints the border for the specified component with the specified position and size. |
| private void | |
| private void | |
| private void |
| etchType | back to summary |
|---|---|
| protected int etchType The type of etch to be drawn by the border. | |
| highlight | back to summary |
|---|---|
| protected Color highlight The color to use for the etched highlight. | |
| LOWERED | back to summary |
|---|---|
| public static final int LOWERED Lowered etched type. | |
| RAISED | back to summary |
|---|---|
| public static final int RAISED Raised etched type. | |
| shadow | back to summary |
|---|---|
| protected Color shadow The color to use for the etched shadow. | |
| EtchedBorder | back to summary |
|---|---|
| public EtchedBorder() Creates a lowered etched border whose colors will be derived from the background color of the component passed into the paintBorder method. | |
| EtchedBorder | back to summary |
|---|---|
| public EtchedBorder(int etchType) Creates an etched border with the specified etch-type whose colors will be derived from the background color of the component passed into the paintBorder method.
| |
| EtchedBorder | back to summary |
|---|---|
| public EtchedBorder(Color highlight, Color shadow) Creates a lowered etched border with the specified highlight and shadow colors. | |
| EtchedBorder | back to summary |
|---|---|
| public EtchedBorder(int etchType, Color highlight, Color shadow) Creates an etched border with the specified etch-type, highlight and shadow colors.
| |
| getBorderInsets | back to summary |
|---|---|
| public Insets getBorderInsets(Component c, Insets insets) Overrides javax. Reinitialize the insets parameter with this Border's current Insets.
| |
| getEtchType | back to summary |
|---|---|
| public int getEtchType() Returns which etch-type is set on the etched border.
| |
| getHighlightColor | back to summary |
|---|---|
| public Color getHighlightColor(Component c) Returns the highlight color of the etched border when rendered on the specified component. If no highlight color was specified at instantiation, the highlight color is derived from the specified component's background color. | |
| getHighlightColor | back to summary |
|---|---|
| public Color getHighlightColor() Returns the highlight color of the etched border. Will return null if no highlight color was specified at instantiation.
| |
| getShadowColor | back to summary |
|---|---|
| public Color getShadowColor(Component c) Returns the shadow color of the etched border when rendered on the specified component. If no shadow color was specified at instantiation, the shadow color is derived from the specified component's background color. | |
| getShadowColor | back to summary |
|---|---|
| public Color getShadowColor() Returns the shadow color of the etched border. Will return null if no shadow color was specified at instantiation.
| |
| isBorderOpaque | back to summary |
|---|---|
| public boolean isBorderOpaque() Overrides javax. Implements javax. Returns whether or not the border is opaque. This implementation returns true.
| |
| paintBorder | back to summary |
|---|---|
| public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) Overrides javax. Implements javax. Paints the border for the specified component with the specified position and size. | |
| paintBorderHighlight | back to summary |
|---|---|
| private void paintBorderHighlight(Graphics g, Color c, int w, int h, int stkWidth) | |
| paintBorderShadow | back to summary |
|---|---|
| private void paintBorderShadow(Graphics g, Color c, int w, int h, int stkWidth) | |
| paintUnscaledBorder | back to summary |
|---|---|
| private void paintUnscaledBorder(Component c, Graphics g, int w, int h, double scaleFactor) | |