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.utils.menu
Class SubstanceMenuBackgroundDelegate

    java.lang.Object
      org.jvnet.substance.utils.menu.SubstanceMenuBackgroundDelegate

    public class SubstanceMenuBackgroundDelegate

extends java.lang.Object

Delegate for painting background of menu items.

Author:
  Kirill Grouchnikov

Constructor Summary
`SubstanceMenuBackgroundDelegate(float fillAlpha)` Creates a new background delegate for menu items.

Method Summary
`void` | `paintBackground(java.awt.Graphics g, javax.swing.JMenuItem menuItem, java.awt.Color bgColor, float borderAlpha, int textOffset)` Updates the specified menu item with the background that matches the provided parameters.
`static void` | `paintHighlights(java.awt.Graphics g, javax.swing.JMenuItem menuItem, float borderAlpha)` Paints menu highlights.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SubstanceMenuBackgroundDelegate

    public SubstanceMenuBackgroundDelegate(float fillAlpha)

  Creates a new background delegate for menu items.

  Parameters:
    `fillAlpha` - Alphs attribute for the fill.

Method Detail

### paintBackground

    public void paintBackground(java.awt.Graphics g,
                                javax.swing.JMenuItem menuItem,
                                java.awt.Color bgColor,
                                float borderAlpha,
                                int textOffset)

  Updates the specified menu item with the background that matches the provided parameters.

  Parameters:
    `g` - Graphic context.
    `menuItem` - Menu item.
    `bgColor` - Current background color.
    `borderAlpha` - Border alpha.
    `textOffset` - The offset of the menu item text.

### paintHighlights

    public static void paintHighlights(java.awt.Graphics g,
                                       javax.swing.JMenuItem menuItem,
                                       float borderAlpha)

  Paints menu highlights.

  Parameters:
    `g` - Graphics context.
    `menuItem` - Menu item.
    `borderAlpha` - Alpha channel for painting the border.

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

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