java.lang.Object | ||
↳ | javax.swing.border.AbstractBorder | |
↳ | javax.swing.border.LineBorder |
![]() |
A class which implements a line border of arbitrary thickness and of a single color.
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 JavaBeansTM
has been added to the java.beans
package.
Please see XMLEncoder
.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
lineColor | |||||||||||
roundedCorners | |||||||||||
thickness |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a line border with the specified color and a
thickness = 1.
| |||||||||||
Creates a line border with the specified color and thickness.
| |||||||||||
Creates a line border with the specified color, thickness,
and corner shape.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Convenience method for getting the Color.black LineBorder of thickness 1.
| |||||||||||
Convenience method for getting the Color.gray LineBorder of thickness 1.
| |||||||||||
Reinitialize the insets parameter with this Border's current Insets.
| |||||||||||
Returns the insets of the border.
| |||||||||||
Returns the color of the border.
| |||||||||||
Returns whether this border will be drawn with rounded corners.
| |||||||||||
Returns the thickness of the border.
| |||||||||||
Returns whether or not the border is opaque.
| |||||||||||
Paints the border for the specified component with the
specified position and size.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Creates a line border with the specified color and a thickness = 1.
color | the color for the border |
---|
Creates a line border with the specified color and thickness.
color | the color of the border |
---|---|
thickness | the thickness of the border |
Creates a line border with the specified color, thickness, and corner shape.
color | the color of the border |
---|---|
thickness | the thickness of the border |
roundedCorners | whether or not border corners should be round |
Convenience method for getting the Color.black LineBorder of thickness 1.
Convenience method for getting the Color.gray LineBorder of thickness 1.
Reinitialize the insets parameter with this Border's current Insets.
c | the component for which this border insets value applies |
---|---|
insets | the object to be reinitialized |
insets
object
Returns the insets of the border.
c | the component for which this border insets value applies |
---|
Insets
object initialized to 0
Returns whether this border will be drawn with rounded corners.
Returns the thickness of the border.
Returns whether or not the border is opaque.
Paints the border for the specified component with the specified position and size.
c | the component for which this border is being painted |
---|---|
g | the paint graphics |
x | the x position of the painted border |
y | the y position of the painted border |
width | the width of the painted border |
height | the height of the painted border |