Package com.jidesoft.plaf.vsnet
Class VsnetMenuUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.MenuItemUI
com.jidesoft.plaf.vsnet.VsnetMenuItemUI
com.jidesoft.plaf.vsnet.VsnetMenuUI
- Direct Known Subclasses:
BasicJideSplitButtonUI
Menu UI implementation
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
Instantiated and used by a menu item to handle the current menu selection from mouse events.protected static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ChangeListener
protected MenuListener
protected PropertyChangeListener
Fields inherited from class com.jidesoft.plaf.vsnet.VsnetMenuItemUI
_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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static void
appendPath
(MenuElement[] path, MenuElement elem) protected ActionMap
Invoked to create the ActionMap.protected ChangeListener
protected MenuDragMouseListener
protected MenuKeyListener
protected MenuListener
protected MouseInputListener
protected PopupMenuListener
protected PropertyChangeListener
static ComponentUI
protected ActionMap
The ActionMap for BasicMenUI can not be shared, this is subclassed to create a new one for each invocation.protected String
protected void
protected void
protected void
protected boolean
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
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
protected void
protected void
protected void
Methods inherited from class com.jidesoft.plaf.vsnet.VsnetMenuItemUI
createInputMap, doClick, getIcon, getMinimumSize, getPainter, getPath, getPreferredMenuItemSize, getRightMargin, installComponents, installUI, isDownArrowVisible, isFloatingIcon, paint, paintCheckBox, paintIcon, paintMenuItem, uninstallComponents, uninstallUI, update, useCheckAndArrow
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior
-
Field Details
-
changeListener
-
propertyChangeListener
-
-
Constructor Details
-
VsnetMenuUI
public VsnetMenuUI()
-
-
Method Details
-
createUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaults
in classVsnetMenuItemUI
-
getPropertyPrefix
- Overrides:
getPropertyPrefix
in classVsnetMenuItemUI
-
paintBackground
Description copied from class:VsnetMenuItemUI
Draws the background of the menu item.- Overrides:
paintBackground
in classVsnetMenuItemUI
- Parameters:
g
- the paint graphicsmenuItem
- menu item to be paintedbgColor
- selection background color
-
installListeners
protected void installListeners()- Overrides:
installListeners
in classVsnetMenuItemUI
-
createPopupMenuListener
-
installKeyboardActions
protected void installKeyboardActions()- Overrides:
installKeyboardActions
in classVsnetMenuItemUI
-
updateMnemonicBinding
protected void updateMnemonicBinding() -
uninstallKeyboardActions
protected void uninstallKeyboardActions()- Overrides:
uninstallKeyboardActions
in classVsnetMenuItemUI
-
getActionMap
The ActionMap for BasicMenUI can not be shared, this is subclassed to create a new one for each invocation.- Overrides:
getActionMap
in classVsnetMenuItemUI
-
createActionMap
Invoked to create the ActionMap.- Overrides:
createActionMap
in classVsnetMenuItemUI
-
createMouseInputListener
- Overrides:
createMouseInputListener
in classVsnetMenuItemUI
-
createMenuListener
-
createChangeListener
-
createPropertyChangeListener
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaults
in classVsnetMenuItemUI
-
uninstallListeners
protected void uninstallListeners()- Overrides:
uninstallListeners
in classVsnetMenuItemUI
-
createMenuDragMouseListener
- Overrides:
createMenuDragMouseListener
in classVsnetMenuItemUI
-
createMenuKeyListener
- Overrides:
createMenuKeyListener
in classVsnetMenuItemUI
-
getMaximumSize
- Overrides:
getMaximumSize
in classVsnetMenuItemUI
-
setupPostTimer
-
appendPath
-
paintText
Method which renders the text of the current menu item.- Overrides:
paintText
in classVsnetMenuItemUI
- Parameters:
g
- Graphics contextmenuItem
- Current menu item to rendertextRect
- Bounding rectangle to render the text.text
- String to render- Since:
- 1.4
-
setMouseOver
protected void setMouseOver(boolean over) Set the temporary flag to indicate if the mouse has entered the menu.- Parameters:
over
- the flag
-
isMouseOver
protected boolean isMouseOver()Get the temporary flag to indicate if the mouse has entered the menu.- Returns:
- the flag.
-
getPreferredSize
- Overrides:
getPreferredSize
in classVsnetMenuItemUI
-