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 classInstantiated and used by a menu item to handle the current menu selection from mouse events.protected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ChangeListenerprotected MenuListenerprotected PropertyChangeListenerFields 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 voidappendPath(MenuElement[] path, MenuElement elem) protected ActionMapInvoked to create the ActionMap.protected ChangeListenerprotected MenuDragMouseListenerprotected MenuKeyListenerprotected MenuListenerprotected MouseInputListenerprotected PopupMenuListenerprotected PropertyChangeListenerstatic ComponentUIprotected ActionMapThe ActionMap for BasicMenUI can not be shared, this is subclassed to create a new one for each invocation.protected Stringprotected voidprotected voidprotected voidprotected booleanGet the temporary flag to indicate if the mouse has entered the menu.protected voidpaintBackground(Graphics g, JMenuItem menuItem, Color bgColor) Draws the background of the menu item.protected voidMethod which renders the text of the current menu item.protected voidsetMouseOver(boolean over) Set the temporary flag to indicate if the mouse has entered the menu.protected static voidsetupPostTimer(JMenu menu) protected voidprotected voidprotected voidprotected voidMethods 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, useCheckAndArrowMethods 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:
installDefaultsin classVsnetMenuItemUI
-
getPropertyPrefix
- Overrides:
getPropertyPrefixin classVsnetMenuItemUI
-
paintBackground
Description copied from class:VsnetMenuItemUIDraws the background of the menu item.- Overrides:
paintBackgroundin classVsnetMenuItemUI- Parameters:
g- the paint graphicsmenuItem- menu item to be paintedbgColor- selection background color
-
installListeners
protected void installListeners()- Overrides:
installListenersin classVsnetMenuItemUI
-
createPopupMenuListener
-
installKeyboardActions
protected void installKeyboardActions()- Overrides:
installKeyboardActionsin classVsnetMenuItemUI
-
updateMnemonicBinding
protected void updateMnemonicBinding() -
uninstallKeyboardActions
protected void uninstallKeyboardActions()- Overrides:
uninstallKeyboardActionsin classVsnetMenuItemUI
-
getActionMap
The ActionMap for BasicMenUI can not be shared, this is subclassed to create a new one for each invocation.- Overrides:
getActionMapin classVsnetMenuItemUI
-
createActionMap
Invoked to create the ActionMap.- Overrides:
createActionMapin classVsnetMenuItemUI
-
createMouseInputListener
- Overrides:
createMouseInputListenerin classVsnetMenuItemUI
-
createMenuListener
-
createChangeListener
-
createPropertyChangeListener
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaultsin classVsnetMenuItemUI
-
uninstallListeners
protected void uninstallListeners()- Overrides:
uninstallListenersin classVsnetMenuItemUI
-
createMenuDragMouseListener
- Overrides:
createMenuDragMouseListenerin classVsnetMenuItemUI
-
createMenuKeyListener
- Overrides:
createMenuKeyListenerin classVsnetMenuItemUI
-
getMaximumSize
- Overrides:
getMaximumSizein classVsnetMenuItemUI
-
setupPostTimer
-
appendPath
-
paintText
Method which renders the text of the current menu item.- Overrides:
paintTextin 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:
getPreferredSizein classVsnetMenuItemUI
-