javax.swing.plaf.metal
public static class MetalBorders.MenuBarBorder extends AbstractBorder implements UIResource
JMenuBar
components.Modifier and Type | Field and Description |
---|---|
protected static Insets |
borderInsets
The border insets.
|
Constructor and Description |
---|
MetalBorders.MenuBarBorder()
Creates a new border instance.
|
Modifier and Type | Method and Description |
---|---|
Insets |
getBorderInsets(Component c)
Returns the border insets.
|
Insets |
getBorderInsets(Component c,
Insets insets)
Populates
insets with the border insets, then returns it. |
void |
paintBorder(Component c,
Graphics g,
int x,
int y,
int w,
int h)
Paints the border for the component.
|
getInteriorRectangle, getInteriorRectangle, isBorderOpaque
protected static Insets borderInsets
public MetalBorders.MenuBarBorder()
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
JMenu
or an armed JMenuItem
.paintBorder
in interface Border
paintBorder
in class AbstractBorder
c
- the component.g
- the graphics device.x
- the x-coordinate of the border area.y
- the y-coordinate of the border area.w
- the width of the border area.h
- the height of the border area.public Insets getBorderInsets(Component c)
getBorderInsets
in interface Border
getBorderInsets
in class AbstractBorder
c
- the component (ignored).AbstractBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
public Insets getBorderInsets(Component c, Insets insets)
insets
with the border insets, then returns it.getBorderInsets
in class AbstractBorder
c
- the component (ignored).insets
- the object to populate with the border insets.NullPointerException
- if insets
is null
.AbstractBorder.getBorderInsets(Component)