public static class MetalBorders.ButtonBorder extends javax.swing.border.AbstractBorder implements javax.swing.plaf.UIResource
A border used for JButton components.
This Border implementation can handle only instances of
AbstractButton and their subclasses.
If the Metal Look and Feel's current theme is 'Ocean' the border
will be painted with a special highlight when the mouse cursor if
over the button (ie. the property rollover of the
button's model is true) and is not a direct
child of a JToolBar.
| Modifier and Type | Field and Description |
|---|---|
protected static java.awt.Insets |
borderInsets
The borders insets.
|
| Constructor and Description |
|---|
MetalBorders.ButtonBorder()
Creates a new instance of
ButtonBorder. |
| Modifier and Type | Method and Description |
|---|---|
java.awt.Insets |
getBorderInsets(java.awt.Component c)
Returns the insets of the
ButtonBorder. |
java.awt.Insets |
getBorderInsets(java.awt.Component c,
java.awt.Insets newInsets)
Returns the insets of the
ButtonBorder in the specified
newInsets object. |
void |
paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int w,
int h)
Paints the button border.
|
protected static java.awt.Insets borderInsets
public MetalBorders.ButtonBorder()
ButtonBorder.public void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int w, int h)
paintBorder in interface javax.swing.border.BorderpaintBorder in class javax.swing.border.AbstractBorderc - the component for which we paint the borderg - the Graphics context to usex - the X coordinate of the upper left corner of cy - the Y coordinate of the upper left corner of cw - the width of ch - the height of cpublic java.awt.Insets getBorderInsets(java.awt.Component c)
ButtonBorder.getBorderInsets in interface javax.swing.border.BordergetBorderInsets in class javax.swing.border.AbstractBorderc - the component for which the border is used (ignored).ButtonBorder.AbstractBorder.getBorderInsets(java.awt.Component, java.awt.Insets)public java.awt.Insets getBorderInsets(java.awt.Component c, java.awt.Insets newInsets)
ButtonBorder in the specified
newInsets object.getBorderInsets in class javax.swing.border.AbstractBorderc - the component for which the border is used (ignored).newInsets - the insets object where to put the values (
null not permitted).newInsets reference.AbstractBorder.getBorderInsets(Component)