public class EclipseMenuUI extends EclipseMenuItemUI
Modifier and Type | Class and Description |
---|---|
class |
EclipseMenuUI.ChangeHandler
As of Java 2 platform 1.4, this previously undocumented class is now obsolete.
|
protected class |
EclipseMenuUI.MouseInputHandler
Instantiated and used by a menu item to handle the current menu selection from mouse events.
|
Modifier and Type | Field and Description |
---|---|
protected ChangeListener |
changeListener |
protected MenuListener |
menuListener |
protected PropertyChangeListener |
propertyChangeListener |
_painter, acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultAccelEndGap, defaultShadowWidth, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, selectionBackground, selectionForeground, shadowColor
Constructor and Description |
---|
EclipseMenuUI() |
Modifier and Type | Method and Description |
---|---|
protected static void |
appendPath(MenuElement[] path,
MenuElement elem) |
protected ChangeListener |
createChangeListener(JComponent c) |
protected MenuDragMouseListener |
createMenuDragMouseListener(JComponent c) |
protected MenuKeyListener |
createMenuKeyListener(JComponent c) |
protected MenuListener |
createMenuListener(JComponent c) |
protected MouseInputListener |
createMouseInputListener(JComponent c) |
protected PropertyChangeListener |
createPropertyChangeListener(JComponent c) |
static ComponentUI |
createUI(JComponent x) |
Dimension |
getMaximumSize(JComponent c) |
Dimension |
getPreferredSize(JComponent c) |
protected String |
getPropertyPrefix() |
protected void |
installDefaults() |
protected void |
installKeyboardActions() |
protected void |
installListeners() |
protected boolean |
isMouseOver()
Get the temporary flag to indicate if the mouse has entered the menu.
|
protected void |
paintBackground(Graphics g,
JMenuItem menuItem,
Color bgColor)
Draws the background of the menu item.
|
protected void |
paintText(Graphics g,
JMenuItem menuItem,
Rectangle textRect,
String text)
Method which renders the text of the current menu item.
|
protected void |
setMouseOver(boolean over)
Set the temporary flag to indicate if the mouse has entered the menu.
|
static void |
setupPostTimer(JMenu menu) |
protected void |
uninstallDefaults() |
protected void |
uninstallKeyboardActions() |
protected void |
uninstallListeners() |
protected void |
updateMnemonicBinding() |
doClick, getMinimumSize, getPainter, getPath, getPreferredMenuItemSize, installComponents, installUI, isDownArrowVisible, paint, paintMenuItem, uninstallComponents, uninstallUI, update
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior
protected ChangeListener changeListener
protected PropertyChangeListener propertyChangeListener
protected MenuListener menuListener
public static ComponentUI createUI(JComponent x)
protected void installDefaults()
installDefaults
in class EclipseMenuItemUI
protected String getPropertyPrefix()
getPropertyPrefix
in class EclipseMenuItemUI
protected void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor)
paintBackground
in class EclipseMenuItemUI
g
- the paint graphicsmenuItem
- menu item to be paintedbgColor
- selection background colorprotected void installListeners()
installListeners
in class EclipseMenuItemUI
protected void installKeyboardActions()
installKeyboardActions
in class EclipseMenuItemUI
protected void updateMnemonicBinding()
protected void uninstallKeyboardActions()
uninstallKeyboardActions
in class EclipseMenuItemUI
protected MouseInputListener createMouseInputListener(JComponent c)
createMouseInputListener
in class EclipseMenuItemUI
protected MenuListener createMenuListener(JComponent c)
protected ChangeListener createChangeListener(JComponent c)
protected PropertyChangeListener createPropertyChangeListener(JComponent c)
protected void uninstallDefaults()
uninstallDefaults
in class EclipseMenuItemUI
protected void uninstallListeners()
uninstallListeners
in class EclipseMenuItemUI
protected MenuDragMouseListener createMenuDragMouseListener(JComponent c)
createMenuDragMouseListener
in class EclipseMenuItemUI
protected MenuKeyListener createMenuKeyListener(JComponent c)
createMenuKeyListener
in class EclipseMenuItemUI
public Dimension getMaximumSize(JComponent c)
getMaximumSize
in class EclipseMenuItemUI
public static void setupPostTimer(JMenu menu)
protected static void appendPath(MenuElement[] path, MenuElement elem)
protected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text)
paintText
in class EclipseMenuItemUI
g
- Graphics contextmenuItem
- Current menu item to rendertextRect
- Bounding rectangle to render the text.text
- String to renderprotected void setMouseOver(boolean over)
protected boolean isMouseOver()
public Dimension getPreferredSize(JComponent c)
getPreferredSize
in class EclipseMenuItemUI