public class MatteBorder extends EmptyBorder
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 XMLEncoder.
| Modifier and Type | Field and Description |
|---|---|
protected Color |
color
|
protected Icon |
tileIcon
|
bottom, left, right, top| Constructor and Description |
|---|
MatteBorder(Icon
Creates a matte border with the specified tile icon.
|
MatteBorder(Insets
Creates a matte border with the specified insets and color.
|
MatteBorder(Insets
Creates a matte border with the specified insets and tile icon.
|
MatteBorder(int top, int left, int bottom, int right, Color
Creates a matte border with the specified insets and color.
|
MatteBorder(int top, int left, int bottom, int right, Icon
Creates a matte border with the specified insets and tile icon.
|
| Modifier and Type | Method and Description |
|---|---|
Insets |
getBorderInsets()
Returns the insets of the border.
|
Insets |
getBorderInsets(Component
Reinitialize the insets parameter with this Border's current Insets.
|
Color |
getMatteColor()
Returns the color used for tiling the border or null if a tile icon is being used.
|
Icon |
getTileIcon()
Returns the icon used for tiling the border or null if a solid color is being used.
|
boolean |
isBorderOpaque()
Returns whether or not the border is opaque.
|
void |
paintBorder(Component
Paints the matte border.
|
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectanglepublic MatteBorder(int top,
int left,
int bottom,
int right,
Color matteColor)
top - the top inset of the border
left - the left inset of the border
bottom - the bottom inset of the border
right - the right inset of the border
matteColor - the color rendered for the border
public MatteBorder(InsetsborderInsets, Color matteColor)
borderInsets - the insets of the border
matteColor - the color rendered for the border
public MatteBorder(int top,
int left,
int bottom,
int right,
Icon tileIcon)
top - the top inset of the border
left - the left inset of the border
bottom - the bottom inset of the border
right - the right inset of the border
tileIcon - the icon to be used for tiling the border
public MatteBorder(InsetsborderInsets, Icon tileIcon)
borderInsets - the insets of the border
tileIcon - the icon to be used for tiling the border
public MatteBorder(IcontileIcon)
tileIcon - the icon to be used for tiling the border
public void paintBorder(Componentc, Graphics g, int x, int y, int width, int height)
paintBorder in interface
Border
paintBorder in class
EmptyBorder
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
public InsetsgetBorderInsets(Component c, Insets insets)
getBorderInsets in class
EmptyBorder
c - the component for which this border insets value applies
insets - the object to be reinitialized
insets object
public InsetsgetBorderInsets()
getBorderInsets in class
EmptyBorder
public ColorgetMatteColor()
public IcongetTileIcon()
public boolean isBorderOpaque()
isBorderOpaque in interface
Border
isBorderOpaque in class
EmptyBorder