Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jvnet.substance
Class SubstanceMenuUI

    java.lang.Object
      javax.swing.plaf.ComponentUI
          javax.swing.plaf.ButtonUI
              javax.swing.plaf.MenuItemUI
                  javax.swing.plaf.basic.BasicMenuItemUI
                      javax.swing.plaf.basic.BasicMenuUI
                          org.jvnet.substance.SubstanceMenuUI

All Implemented Interfaces:
  SubstanceMenu

    public class SubstanceMenuUI

extends javax.swing.plaf.basic.BasicMenuUI
implements SubstanceMenu

UI for menus in Substance look and feel.

Author:
  Kirill Grouchnikov

Nested Class Summary

Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicMenuUI
`javax.swing.plaf.basic.BasicMenuUI.ChangeHandler, javax.swing.plaf.basic.BasicMenuUI.MouseInputHandler`

Field Summary
`protected org.jvnet.lafwidget.animation.FadeStateListener` | `substanceFadeStateListener` Listener for fade animations.
`protected java.awt.event.FocusListener` | `substanceFocusListener` For rollover effects - enhancement 93.
`protected MenuUtilities.MenuPropertyListener` | `substanceMenuPropertyListener` Listens on all changes to the underlying menu item.
`protected java.awt.event.MouseListener` | `substanceMouseListener` For rollover effects - enhancement 93.
`protected java.beans.PropertyChangeListener` | `substancePropertyListener` Property change listener.

Fields inherited from class javax.swing.plaf.basic.BasicMenuUI
`changeListener, menuListener`

Fields inherited from class javax.swing.plaf.basic.BasicMenuItemUI
`acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, propertyChangeListener, selectionBackground, selectionForeground`

Constructor Summary
`SubstanceMenuUI()`

Method Summary
`static javax.swing.plaf.ComponentUI` | `createUI(javax.swing.JComponent comp)`
`java.awt.Font` | `getAcceleratorFont()` Returns the font of the accelerator string of `this` UI delegate.
`javax.swing.Icon` | `getArrowIcon()` Returns the arrow icon of `this` UI delegate.
`javax.swing.JMenuItem` | `getAssociatedMenuItem()` Returns the associated menu item.
`javax.swing.Icon` | `getCheckIcon()` Returns the checkmark icon of `this` UI delegate.
`int` | `getDefaultTextIconGap()` Returns the default gap between the icon and the text for `this` delegate.
`protected java.awt.Dimension` | `getPreferredMenuItemSize(javax.swing.JComponent c, javax.swing.Icon checkIcon, javax.swing.Icon arrowIcon, int defaultTextIconGap)`
`protected void` | `installDefaults()`
`protected void` | `installListeners()`
`protected void` | `paintMenuItem(java.awt.Graphics g, javax.swing.JComponent c, javax.swing.Icon checkIcon, javax.swing.Icon arrowIcon, java.awt.Color background, java.awt.Color foreground, int defaultTextIconGap)`
`protected void` | `uninstallListeners()`

Methods inherited from class javax.swing.plaf.basic.BasicMenuUI
`createChangeListener, createMenuDragMouseListener, createMenuKeyListener, createMenuListener, createMouseInputListener, createPropertyChangeListener, getMaximumSize, getPropertyPrefix, installKeyboardActions, setupPostTimer, uninstallDefaults, uninstallKeyboardActions`

Methods inherited from class javax.swing.plaf.basic.BasicMenuItemUI
`doClick, getMinimumSize, getPath, getPreferredSize, installComponents, installUI, paint, paintBackground, paintText, 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

### substanceMouseListener

    protected java.awt.event.MouseListener substanceMouseListener

  For rollover effects - enhancement 93.

### substanceFadeStateListener

    protected org.jvnet.lafwidget.animation.FadeStateListener substanceFadeStateListener

  Listener for fade animations.

### substanceMenuPropertyListener

    protected MenuUtilities.MenuPropertyListener substanceMenuPropertyListener

  Listens on all changes to the underlying menu item.

### substancePropertyListener

    protected java.beans.PropertyChangeListener substancePropertyListener

  Property change listener. Listens on changes to `AbstractButton.MODEL_CHANGED_PROPERTY` property.

### substanceFocusListener

    protected java.awt.event.FocusListener substanceFocusListener

  For rollover effects - enhancement 93.

Constructor Detail

### SubstanceMenuUI

    public SubstanceMenuUI()

Method Detail

### createUI

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

### installDefaults

    protected void installDefaults()

  Overrides:
    `installDefaults` in class `javax.swing.plaf.basic.BasicMenuUI`

### installListeners

    protected void installListeners()

  Overrides:
    `installListeners` in class `javax.swing.plaf.basic.BasicMenuUI`

### uninstallListeners

    protected void uninstallListeners()

  Overrides:
    `uninstallListeners` in class `javax.swing.plaf.basic.BasicMenuUI`

### getAssociatedMenuItem

    public javax.swing.JMenuItem getAssociatedMenuItem()

  Description copied from interface: `SubstanceMenu`
  Returns the associated menu item.

  Specified by:
    `getAssociatedMenuItem` in interface `SubstanceMenu`
  Returns:
    The associated menu item.

### getAcceleratorFont

    public java.awt.Font getAcceleratorFont()

  Description copied from interface: `SubstanceMenu`
  Returns the font of the accelerator string of `this` UI delegate.

  Specified by:
    `getAcceleratorFont` in interface `SubstanceMenu`
  Returns:
    The font of the accelerator string of `this` UI delegate.

### getArrowIcon

    public javax.swing.Icon getArrowIcon()

  Description copied from interface: `SubstanceMenu`
  Returns the arrow icon of `this` UI delegate.

  Specified by:
    `getArrowIcon` in interface `SubstanceMenu`
  Returns:
    The arrow icon of `this` UI delegate.

### getCheckIcon

    public javax.swing.Icon getCheckIcon()

  Description copied from interface: `SubstanceMenu`
  Returns the checkmark icon of `this` UI delegate.

  Specified by:
    `getCheckIcon` in interface `SubstanceMenu`
  Returns:
    The checkmark icon of `this` UI delegate.

### getDefaultTextIconGap

    public int getDefaultTextIconGap()

  Description copied from interface: `SubstanceMenu`
  Returns the default gap between the icon and the text for `this` delegate.

  Specified by:
    `getDefaultTextIconGap` in interface `SubstanceMenu`
  Returns:
    The default gap between the icon and the text for `this` delegate.

### getPreferredMenuItemSize

    protected java.awt.Dimension getPreferredMenuItemSize(javax.swing.JComponent c,
                                                          javax.swing.Icon checkIcon,
                                                          javax.swing.Icon arrowIcon,
                                                          int defaultTextIconGap)

  Overrides:
    `getPreferredMenuItemSize` in class `javax.swing.plaf.basic.BasicMenuItemUI`

### paintMenuItem

    protected void paintMenuItem(java.awt.Graphics g,
                                 javax.swing.JComponent c,
                                 javax.swing.Icon checkIcon,
                                 javax.swing.Icon arrowIcon,
                                 java.awt.Color background,
                                 java.awt.Color foreground,
                                 int defaultTextIconGap)

  Overrides:
    `paintMenuItem` in class `javax.swing.plaf.basic.BasicMenuItemUI`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD