javax.swing.plaf.basic
Class BasicPopupMenuSeparatorUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.SeparatorUI
javax.swing.plaf.basic.BasicSeparatorUI
javax.swing.plaf.basic.BasicPopupMenuSeparatorUI
public class BasicPopupMenuSeparatorUI
- extends BasicSeparatorUI
The Basic Look and Feel UI delegate for JPopupMenu.Separator.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicPopupMenuSeparatorUI
public BasicPopupMenuSeparatorUI()
- Creates a new BasicPopupMenuSeparatorUI object.
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
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.
- Overrides:
paint
in class BasicSeparatorUI
- Parameters:
g
- The Graphics object to paint withc
- The JComponent to paint.
getPreferredSize
public Dimension getPreferredSize(JComponent c)
- This method returns the preferred size of the
JComponent.
- Overrides:
getPreferredSize
in class BasicSeparatorUI
- Parameters:
c
- The JComponent to measure.
- Returns:
- The preferred size.