JIDE 3.5.15

com.jidesoft.plaf.vsnet
Class VsnetMenuUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.ButtonUI
          extended by javax.swing.plaf.MenuItemUI
              extended by com.jidesoft.plaf.vsnet.VsnetMenuItemUI
                  extended by com.jidesoft.plaf.vsnet.VsnetMenuUI
Direct Known Subclasses:
BasicChevronUI, BasicJideSplitButtonUI

public class VsnetMenuUI
extends VsnetMenuItemUI

Menu UI implementation


Nested Class Summary
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
           
 
Field Summary
protected  ChangeListener changeListener
           
protected  MenuListener menuListener
           
protected  PropertyChangeListener 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
VsnetMenuUI()
           
 
Method Summary
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)
           
protected  ActionMap getActionMap()
          The ActionMap for BasicMenUI can not be shared, this is subclassed to create a new one for each invocation.
 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()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

changeListener

protected ChangeListener changeListener

propertyChangeListener

protected PropertyChangeListener propertyChangeListener

menuListener

protected MenuListener menuListener
Constructor Detail

VsnetMenuUI

public VsnetMenuUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent x)

installDefaults

protected void installDefaults()
Overrides:
installDefaults in class VsnetMenuItemUI

getPropertyPrefix

protected String getPropertyPrefix()
Overrides:
getPropertyPrefix in class VsnetMenuItemUI

paintBackground

protected void paintBackground(Graphics g,
                               JMenuItem menuItem,
                               Color bgColor)
Description copied from class: VsnetMenuItemUI
Draws the background of the menu item.

Overrides:
paintBackground in class VsnetMenuItemUI
Parameters:
g - the paint graphics
menuItem - menu item to be painted
bgColor - selection background color

installListeners

protected void installListeners()
Overrides:
installListeners in class VsnetMenuItemUI

createPopupMenuListener

protected PopupMenuListener createPopupMenuListener()

installKeyboardActions

protected void installKeyboardActions()
Overrides:
installKeyboardActions in class VsnetMenuItemUI

updateMnemonicBinding

protected void updateMnemonicBinding()

uninstallKeyboardActions

protected void uninstallKeyboardActions()
Overrides:
uninstallKeyboardActions in class VsnetMenuItemUI

getActionMap

protected ActionMap getActionMap()
The ActionMap for BasicMenUI can not be shared, this is subclassed to create a new one for each invocation.

Overrides:
getActionMap in class VsnetMenuItemUI

createActionMap

protected ActionMap createActionMap()
Invoked to create the ActionMap.

Overrides:
createActionMap in class VsnetMenuItemUI

createMouseInputListener

protected MouseInputListener createMouseInputListener(JComponent c)
Overrides:
createMouseInputListener in class VsnetMenuItemUI

createMenuListener

protected MenuListener createMenuListener(JComponent c)

createChangeListener

protected ChangeListener createChangeListener(JComponent c)

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener(JComponent c)

uninstallDefaults

protected void uninstallDefaults()
Overrides:
uninstallDefaults in class VsnetMenuItemUI

uninstallListeners

protected void uninstallListeners()
Overrides:
uninstallListeners in class VsnetMenuItemUI

createMenuDragMouseListener

protected MenuDragMouseListener createMenuDragMouseListener(JComponent c)
Overrides:
createMenuDragMouseListener in class VsnetMenuItemUI

createMenuKeyListener

protected MenuKeyListener createMenuKeyListener(JComponent c)
Overrides:
createMenuKeyListener in class VsnetMenuItemUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class VsnetMenuItemUI

setupPostTimer

protected static void setupPostTimer(JMenu menu)

appendPath

protected static void appendPath(MenuElement[] path,
                                 MenuElement elem)

paintText

protected void paintText(Graphics g,
                         JMenuItem menuItem,
                         Rectangle textRect,
                         String text)
Method which renders the text of the current menu item.

Overrides:
paintText in class VsnetMenuItemUI
Parameters:
g - Graphics context
menuItem - Current menu item to render
textRect - 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 Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class VsnetMenuItemUI

JIDE 3.5.15