javax.swing.plaf.metal

Class MetalBorders.PopupMenuBorder

public static class MetalBorders.PopupMenuBorder extends AbstractBorder implements UIResource

A border implementation for popup menus.
Field Summary
protected static InsetsborderInsets
The border's insets.
Constructor Summary
PopupMenuBorder()
Constructs a new PopupMenuBorder.
Method Summary
InsetsgetBorderInsets(Component c)
Returns the insets of the border, creating a new Insets instance with each call.
InsetsgetBorderInsets(Component c, Insets i)
Returns the insets of the border, using the supplied Insets instance.
voidpaintBorder(Component c, Graphics g, int x, int y, int w, int h)
Paints the border for component c using the Graphics context g with the dimension x, y, w, h.

Field Detail

borderInsets

protected static Insets borderInsets
The border's insets.

Constructor Detail

PopupMenuBorder

public PopupMenuBorder()
Constructs a new PopupMenuBorder.

Method Detail

getBorderInsets

public Insets getBorderInsets(Component c)
Returns the insets of the border, creating a new Insets instance with each call.

Parameters: c the component for which we return the border insets (not used here)

getBorderInsets

public Insets getBorderInsets(Component c, Insets i)
Returns the insets of the border, using the supplied Insets instance.

Parameters: c the component for which we return the border insets (not used here) i the Insets instance to fill with the Insets values

paintBorder

public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
Paints the border for component c using the Graphics context g with the dimension x, y, w, h.

Parameters: c the component for which we paint the border g the Graphics context to use x the X coordinate of the upper left corner of c y the Y coordinate of the upper left corner of c w the width of c h the height of c