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 |
|---|---|
| private static Border | |
| private static Border | |
| protected Color | lineColor
Color of the border. |
| protected boolean | roundedCorners
Whether or not the border has rounded corners. |
| protected int | thickness
Thickness of the border. |
| Access | Constructor and Description |
|---|---|
| public | LineBorder(Color
the color for the border color)Creates a line border with the specified color and a thickness = 1. |
| public | LineBorder(Color
the color of the border color, int the thickness of the border thickness)Creates a line border with the specified color and thickness. |
| public | LineBorder(Color
the color of the border color, int the thickness of the border thickness, boolean whether or not border corners should be round roundedCorners)Creates a line border with the specified color, thickness, and corner shape. |
| Modifier and Type | Method and Description |
|---|---|
| public static Border | Returns: aLineBorder with Color.black and thickness of 1Convenience method for getting the Color.black LineBorder of thickness 1. |
| public static Border | Returns: aLineBorder with Color.gray and thickness of 1Convenience method for getting the Color.gray LineBorder of thickness 1. |
| 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 Color | Returns: aColor object representing the color of this objectReturns the color of the border. |
| public boolean | Returns: true if this border should have rounded cornersReturns whether this border will be drawn with rounded corners. |
| public int | |
| public boolean | Returns: true if the border is opaque, false otherwiseOverrides 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 |
| blackLine | back to summary |
|---|---|
| private static Border blackLine | |
| grayLine | back to summary |
|---|---|
| private static Border grayLine | |
| lineColor | back to summary |
|---|---|
| protected Color lineColor Color of the border. | |
| roundedCorners | back to summary |
|---|---|
| protected boolean roundedCorners Whether or not the border has rounded corners. | |
| thickness | back to summary |
|---|---|
| protected int thickness Thickness of the border. | |
| LineBorder | back to summary |
|---|---|
| public LineBorder(Color color) Creates a line border with the specified color and a thickness = 1.
| |
| LineBorder | back to summary |
|---|---|
| public LineBorder(Color color, int thickness) Creates a line border with the specified color and thickness.
| |
| LineBorder | back to summary |
|---|---|
| public LineBorder(Color color, int thickness, boolean roundedCorners) Creates a line border with the specified color, thickness, and corner shape.
| |
| createBlackLineBorder | back to summary |
|---|---|
| public static Border createBlackLineBorder() Convenience method for getting the Color.black LineBorder of thickness 1.
| |
| createGrayLineBorder | back to summary |
|---|---|
| public static Border createGrayLineBorder() Convenience method for getting the Color.gray LineBorder of thickness 1.
| |
| getBorderInsets | back to summary |
|---|---|
| public Insets getBorderInsets(Component c, Insets insets) Overrides javax. Reinitialize the insets parameter with this Border's current Insets.
| |
| getLineColor | back to summary |
|---|---|
| public Color getLineColor() Returns the color of the border.
| |
| getRoundedCorners | back to summary |
|---|---|
| public boolean getRoundedCorners() Returns whether this border will be drawn with rounded corners.
| |
| getThickness | back to summary |
|---|---|
| public int getThickness() Returns the thickness of the border.
| |
| isBorderOpaque | back to summary |
|---|---|
| public boolean isBorderOpaque() Overrides javax. Implements javax. Returns whether or not the border is opaque.
| |
| 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. | |
| paintUnscaledBorder | back to summary |
|---|---|
| private void paintUnscaledBorder(Component c, Graphics g, int w, int h, double scaleFactor) | |