public class VsnetMenuUI extends VsnetMenuItemUI
Modifier and Type | Class and Description |
---|---|
protected class |
VsnetMenuUI.MouseInputHandler
Instantiated and used by a menu item to handle the current menu selection from mouse events.
|
protected static class |
VsnetMenuUI.PostAction |
Modifier and Type | Field and Description |
---|---|
protected ChangeListener |
changeListener |
protected MenuListener |
menuListener |
protected PropertyChangeListener |
propertyChangeListener |
_isFloatingIcon, acceleratorFont, acceleratorForeground, acceleratorRect, acceleratorSelectionForeground, arrowIcon, arrowIconRect, backgroundColor, borderColor, checkIcon, checkIconRect, defaultAccelEndGap, defaultShadowWidth, defaultTextIconGap, disabledForeground, iconRect, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, selectionBackground, selectionForeground, shadowColor, textRect, viewRect, windowInputMap, zeroRect
Constructor and Description |
---|
VsnetMenuUI() |
Modifier and Type | Method and Description |
---|---|
protected static void |
appendPath(MenuElement[] path,
MenuElement elem) |
protected ActionMap |
createActionMap()
Invoked to create the ActionMap.
|
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 PopupMenuListener |
createPopupMenuListener() |
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.
|
protected static void |
setupPostTimer(JMenu menu) |
protected void |
uninstallDefaults() |
protected void |
uninstallKeyboardActions() |
protected void |
uninstallListeners() |
protected void |
updateMnemonicBinding() |
createInputMap, doClick, getIcon, getMinimumSize, getPainter, getPath, getPreferredMenuItemSize, getRightMargin, installComponents, installUI, isDownArrowVisible, isFloatingIcon, paint, paintCheckBox, paintIcon, paintMenuItem, uninstallComponents, uninstallUI, update, useCheckAndArrow
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 VsnetMenuItemUI
protected String getPropertyPrefix()
getPropertyPrefix
in class VsnetMenuItemUI
protected void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor)
VsnetMenuItemUI
paintBackground
in class VsnetMenuItemUI
g
- the paint graphicsmenuItem
- menu item to be paintedbgColor
- selection background colorprotected void installListeners()
installListeners
in class VsnetMenuItemUI
protected PopupMenuListener createPopupMenuListener()
protected void installKeyboardActions()
installKeyboardActions
in class VsnetMenuItemUI
protected void updateMnemonicBinding()
protected void uninstallKeyboardActions()
uninstallKeyboardActions
in class VsnetMenuItemUI
protected ActionMap createActionMap()
createActionMap
in class VsnetMenuItemUI
protected MouseInputListener createMouseInputListener(JComponent c)
createMouseInputListener
in class VsnetMenuItemUI
protected MenuListener createMenuListener(JComponent c)
protected ChangeListener createChangeListener(JComponent c)
protected PropertyChangeListener createPropertyChangeListener(JComponent c)
protected void uninstallDefaults()
uninstallDefaults
in class VsnetMenuItemUI
protected void uninstallListeners()
uninstallListeners
in class VsnetMenuItemUI
protected MenuDragMouseListener createMenuDragMouseListener(JComponent c)
createMenuDragMouseListener
in class VsnetMenuItemUI
protected MenuKeyListener createMenuKeyListener(JComponent c)
createMenuKeyListener
in class VsnetMenuItemUI
public Dimension getMaximumSize(JComponent c)
getMaximumSize
in class VsnetMenuItemUI
protected 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 VsnetMenuItemUI
g
- Graphics contextmenuItem
- Current menu item to rendertextRect
- Bounding rectangle to render the text.text
- String to renderprotected void setMouseOver(boolean over)
over
- the flagprotected boolean isMouseOver()
public Dimension getPreferredSize(JComponent c)
getPreferredSize
in class VsnetMenuItemUI