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
public class VsnetMenuUI extends VsnetMenuItemUI
Menu UI implementation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classVsnetMenuUI.MouseInputHandlerInstantiated and used by a menu item to handle the current menu selection from mouse events.protected static classVsnetMenuUI.PostAction
-
Field Summary
Fields Modifier and Type Field Description protected javax.swing.event.ChangeListenerchangeListenerprotected javax.swing.event.MenuListenermenuListenerprotected java.beans.PropertyChangeListenerpropertyChangeListener-
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 Constructor Description VsnetMenuUI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static voidappendPath(javax.swing.MenuElement[] path, javax.swing.MenuElement elem)protected javax.swing.ActionMapcreateActionMap()Invoked to create the ActionMap.protected javax.swing.event.ChangeListenercreateChangeListener(javax.swing.JComponent c)protected javax.swing.event.MenuDragMouseListenercreateMenuDragMouseListener(javax.swing.JComponent c)protected javax.swing.event.MenuKeyListenercreateMenuKeyListener(javax.swing.JComponent c)protected javax.swing.event.MenuListenercreateMenuListener(javax.swing.JComponent c)protected javax.swing.event.MouseInputListenercreateMouseInputListener(javax.swing.JComponent c)protected javax.swing.event.PopupMenuListenercreatePopupMenuListener()protected java.beans.PropertyChangeListenercreatePropertyChangeListener(javax.swing.JComponent c)static javax.swing.plaf.ComponentUIcreateUI(javax.swing.JComponent x)protected javax.swing.ActionMapgetActionMap()The ActionMap for BasicMenUI can not be shared, this is subclassed to create a new one for each invocation.java.awt.DimensiongetMaximumSize(javax.swing.JComponent c)java.awt.DimensiongetPreferredSize(javax.swing.JComponent c)protected java.lang.StringgetPropertyPrefix()protected voidinstallDefaults()protected voidinstallKeyboardActions()protected voidinstallListeners()protected booleanisMouseOver()Get the temporary flag to indicate if the mouse has entered the menu.protected voidpaintBackground(java.awt.Graphics g, javax.swing.JMenuItem menuItem, java.awt.Color bgColor)Draws the background of the menu item.protected voidpaintText(java.awt.Graphics g, javax.swing.JMenuItem menuItem, java.awt.Rectangle textRect, java.lang.String text)Method 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(javax.swing.JMenu menu)protected voiduninstallDefaults()protected voiduninstallKeyboardActions()protected voiduninstallListeners()protected voidupdateMnemonicBinding()-
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
-
-
-
-
Method Detail
-
createUI
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent x)
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaultsin classVsnetMenuItemUI
-
getPropertyPrefix
protected java.lang.String getPropertyPrefix()
- Overrides:
getPropertyPrefixin classVsnetMenuItemUI
-
paintBackground
protected void paintBackground(java.awt.Graphics g, javax.swing.JMenuItem menuItem, java.awt.Color bgColor)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
protected javax.swing.event.PopupMenuListener createPopupMenuListener()
-
installKeyboardActions
protected void installKeyboardActions()
- Overrides:
installKeyboardActionsin classVsnetMenuItemUI
-
updateMnemonicBinding
protected void updateMnemonicBinding()
-
uninstallKeyboardActions
protected void uninstallKeyboardActions()
- Overrides:
uninstallKeyboardActionsin classVsnetMenuItemUI
-
getActionMap
protected javax.swing.ActionMap getActionMap()
The ActionMap for BasicMenUI can not be shared, this is subclassed to create a new one for each invocation.- Overrides:
getActionMapin classVsnetMenuItemUI
-
createActionMap
protected javax.swing.ActionMap createActionMap()
Invoked to create the ActionMap.- Overrides:
createActionMapin classVsnetMenuItemUI
-
createMouseInputListener
protected javax.swing.event.MouseInputListener createMouseInputListener(javax.swing.JComponent c)
- Overrides:
createMouseInputListenerin classVsnetMenuItemUI
-
createMenuListener
protected javax.swing.event.MenuListener createMenuListener(javax.swing.JComponent c)
-
createChangeListener
protected javax.swing.event.ChangeListener createChangeListener(javax.swing.JComponent c)
-
createPropertyChangeListener
protected java.beans.PropertyChangeListener createPropertyChangeListener(javax.swing.JComponent c)
-
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaultsin classVsnetMenuItemUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListenersin classVsnetMenuItemUI
-
createMenuDragMouseListener
protected javax.swing.event.MenuDragMouseListener createMenuDragMouseListener(javax.swing.JComponent c)
- Overrides:
createMenuDragMouseListenerin classVsnetMenuItemUI
-
createMenuKeyListener
protected javax.swing.event.MenuKeyListener createMenuKeyListener(javax.swing.JComponent c)
- Overrides:
createMenuKeyListenerin classVsnetMenuItemUI
-
getMaximumSize
public java.awt.Dimension getMaximumSize(javax.swing.JComponent c)
- Overrides:
getMaximumSizein classVsnetMenuItemUI
-
setupPostTimer
protected static void setupPostTimer(javax.swing.JMenu menu)
-
appendPath
protected static void appendPath(javax.swing.MenuElement[] path, javax.swing.MenuElement elem)
-
paintText
protected void paintText(java.awt.Graphics g, javax.swing.JMenuItem menuItem, java.awt.Rectangle textRect, java.lang.String text)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
public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
- Overrides:
getPreferredSizein classVsnetMenuItemUI
-
-