JIDE Common Layer 2.7.1

com.jidesoft.plaf.eclipse
Class EclipseMenuUI

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.eclipse.EclipseMenuItemUI
                  extended by com.jidesoft.plaf.eclipse.EclipseMenuUI
Direct Known Subclasses:
EclipseJideSplitButtonUI

public class EclipseMenuUI
extends EclipseMenuItemUI

Menu UI implementation


Nested Class Summary
 class EclipseMenuUI.ChangeHandler
          As of Java 2 platform 1.4, this previously undocumented class is now obsolete.
protected  class EclipseMenuUI.MouseInputHandler
          Instantiated and used by a menu item to handle the current menu selection from mouse events.
 
Field Summary
protected  javax.swing.event.ChangeListener changeListener
           
protected  javax.swing.event.MenuListener menuListener
           
protected  java.beans.PropertyChangeListener propertyChangeListener
           
 
Fields inherited from class com.jidesoft.plaf.eclipse.EclipseMenuItemUI
_painter, acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultAccelEndGap, defaultShadowWidth, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, selectionBackground, selectionForeground, shadowColor
 
Constructor Summary
EclipseMenuUI()
           
 
Method Summary
protected static void appendPath(javax.swing.MenuElement[] path, javax.swing.MenuElement elem)
           
protected  javax.swing.event.ChangeListener createChangeListener(javax.swing.JComponent c)
           
protected  javax.swing.event.MenuDragMouseListener createMenuDragMouseListener(javax.swing.JComponent c)
           
protected  javax.swing.event.MenuKeyListener createMenuKeyListener(javax.swing.JComponent c)
           
protected  javax.swing.event.MenuListener createMenuListener(javax.swing.JComponent c)
           
protected  javax.swing.event.MouseInputListener createMouseInputListener(javax.swing.JComponent c)
           
protected  java.beans.PropertyChangeListener createPropertyChangeListener(javax.swing.JComponent c)
           
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent x)
           
 java.awt.Dimension getMaximumSize(javax.swing.JComponent c)
           
 java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
           
protected  java.lang.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(java.awt.Graphics g, javax.swing.JMenuItem menuItem, java.awt.Color bgColor)
          Draws the background of the menu item.
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.
protected  void setMouseOver(boolean over)
          Set the temporary flag to indicate if the mouse has entered the menu.
static void setupPostTimer(javax.swing.JMenu menu)
           
protected  void uninstallDefaults()
           
protected  void uninstallKeyboardActions()
           
protected  void uninstallListeners()
           
 
Methods inherited from class com.jidesoft.plaf.eclipse.EclipseMenuItemUI
doClick, getMinimumSize, getPainter, getPath, getPreferredMenuItemSize, installComponents, installUI, isDownArrowVisible, paint, paintMenuItem, uninstallComponents, uninstallUI, update
 
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 javax.swing.event.ChangeListener changeListener

propertyChangeListener

protected java.beans.PropertyChangeListener propertyChangeListener

menuListener

protected javax.swing.event.MenuListener menuListener
Constructor Detail

EclipseMenuUI

public EclipseMenuUI()
Method Detail

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent x)

installDefaults

protected void installDefaults()
Overrides:
installDefaults in class EclipseMenuItemUI

getPropertyPrefix

protected java.lang.String getPropertyPrefix()
Overrides:
getPropertyPrefix in class EclipseMenuItemUI

paintBackground

protected void paintBackground(java.awt.Graphics g,
                               javax.swing.JMenuItem menuItem,
                               java.awt.Color bgColor)
Draws the background of the menu item.

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

installListeners

protected void installListeners()
Overrides:
installListeners in class EclipseMenuItemUI

installKeyboardActions

protected void installKeyboardActions()
Overrides:
installKeyboardActions in class EclipseMenuItemUI

uninstallKeyboardActions

protected void uninstallKeyboardActions()
Overrides:
uninstallKeyboardActions in class EclipseMenuItemUI

createMouseInputListener

protected javax.swing.event.MouseInputListener createMouseInputListener(javax.swing.JComponent c)
Overrides:
createMouseInputListener in class EclipseMenuItemUI

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:
uninstallDefaults in class EclipseMenuItemUI

uninstallListeners

protected void uninstallListeners()
Overrides:
uninstallListeners in class EclipseMenuItemUI

createMenuDragMouseListener

protected javax.swing.event.MenuDragMouseListener createMenuDragMouseListener(javax.swing.JComponent c)
Overrides:
createMenuDragMouseListener in class EclipseMenuItemUI

createMenuKeyListener

protected javax.swing.event.MenuKeyListener createMenuKeyListener(javax.swing.JComponent c)
Overrides:
createMenuKeyListener in class EclipseMenuItemUI

getMaximumSize

public java.awt.Dimension getMaximumSize(javax.swing.JComponent c)
Overrides:
getMaximumSize in class EclipseMenuItemUI

setupPostTimer

public 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:
paintText in class EclipseMenuItemUI
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.


isMouseOver

protected boolean isMouseOver()
Get the temporary flag to indicate if the mouse has entered the menu.


getPreferredSize

public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
Overrides:
getPreferredSize in class EclipseMenuItemUI

JIDE Common Layer 2.7.1