javax.swing.border
public class EmptyBorder extends AbstractBorder
Field Summary | |
---|---|
protected int | bottom
The number of pixels required at the bottom edge. |
protected int | left
The number of pixels required at the left edge. |
protected int | right
The number of pixels required at the right edge. |
protected int | top
The number of pixels required at the top edge. |
Constructor Summary | |
---|---|
EmptyBorder(int top, int left, int bottom, int right)
Constructs an empty border given the number of pixels required
on each side.
| |
EmptyBorder(Insets borderInsets)
Constructs an empty border given the number of pixels required
on each side, passed in an Insets object.
|
Method Summary | |
---|---|
Insets | getBorderInsets(Component c)
Measures the width of this border.
|
Insets | getBorderInsets(Component c, Insets insets)
Measures the width of this border, storing the results into a
pre-existing Insets object.
|
Insets | getBorderInsets()
Measures the width of this border.
|
boolean | isBorderOpaque()
Determines whether this border fills every pixel in its area
when painting. |
void | paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Performs nothing because an EmptyBorder does not paint any
pixels. |
Parameters: top the number of pixels that the border will need for its top edge. left the number of pixels that the border will need for its left edge. bottom the number of pixels that the border will need for its bottom edge. right the number of pixels that the border will need for its right edge.
Parameters: borderInsets the Insets for the new border.
Parameters: c the component whose border is to be measured.
Returns: an Insets object whose left
, right
,
top
and bottom
fields indicate the
width of the border at the respective edge.
See Also: EmptyBorder
Parameters: insets an Insets object for holding the result values.
After invoking this method, the left
,
right
, top
and
bottom
fields indicate the width of the
border at the respective edge.
Returns: the same object that was passed for insets
.
See Also: getBorderInsets
Returns: an Insets object whose left
, right
,
top
and bottom
fields indicate the
width of the border at the respective edge.
See Also: EmptyBorder
false
.
Returns: false
.
Parameters: c the component whose border is to be painted. g the graphics for painting. x the horizontal position for painting the border. y the vertical position for painting the border. width the width of the available area for painting the border. height the height of the available area for painting the border.