org.jvnet.substance
Class SubstanceMenuBackgroundDelegate

java.lang.Object
  extended by org.jvnet.substance.SubstanceMenuBackgroundDelegate

public class SubstanceMenuBackgroundDelegate
extends Object

Delegate for painting background of menu items.

Author:
Kirill Grouchnikov

Constructor Summary
SubstanceMenuBackgroundDelegate()
           
 
Method Summary
 void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor, boolean hasDarkBorder)
          Updates the specified menu item with the background that matches the provided parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubstanceMenuBackgroundDelegate

public SubstanceMenuBackgroundDelegate()
Method Detail

paintBackground

public void paintBackground(Graphics g,
                            JMenuItem menuItem,
                            Color bgColor,
                            boolean hasDarkBorder)
Updates the specified menu item with the background that matches the provided parameters.

Parameters:
g - Graphic context.
menuItem - Menu item.
bgColor - Current background color.
hasDarkBorder - If true, the resulting image will have dark border.