javax.swing.plaf.basic

Class BasicPopupMenuSeparatorUI

public class BasicPopupMenuSeparatorUI extends BasicSeparatorUI

The Basic Look and Feel UI delegate for JPopupMenu.Separator.
Constructor Summary
BasicPopupMenuSeparatorUI()
Creates a new BasicPopupMenuSeparatorUI object.
Method Summary
static ComponentUIcreateUI(JComponent c)
Creates a new UI delegate for the given JComponent.
DimensiongetPreferredSize(JComponent c)
This method returns the preferred size of the JComponent.
voidpaint(Graphics g, JComponent c)
The Popup Menu Separator has two lines.

Constructor Detail

BasicPopupMenuSeparatorUI

public BasicPopupMenuSeparatorUI()
Creates a new BasicPopupMenuSeparatorUI object.

Method Detail

createUI

public static ComponentUI createUI(JComponent c)
Creates a new UI delegate for the given JComponent.

Parameters: c The JComponent to create a delegate for.

Returns: A new BasicPopupMenuSeparatorUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
This method returns the preferred size of the JComponent.

Parameters: c The JComponent to measure.

Returns: The preferred size.

paint

public void paint(Graphics g, JComponent c)
The Popup Menu Separator has two lines. The top line will be painted using highlight color and the bottom using shadow color.

Parameters: g The Graphics object to paint with c The JComponent to paint.