SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.gui.lookandfeel
Class SIPCommSelectorMenuUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.ButtonUI
          extended by javax.swing.plaf.MenuItemUI
              extended by javax.swing.plaf.basic.BasicMenuItemUI
                  extended by javax.swing.plaf.basic.BasicMenuUI
                      extended by net.java.sip.communicator.impl.gui.lookandfeel.SIPCommSelectorMenuUI
All Implemented Interfaces:
Skinnable

public class SIPCommSelectorMenuUI
extends BasicMenuUI
implements Skinnable

The SIPCommSelectorMenuUI implementation.

Author:
Yana Stamcheva, Adam Netocny

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicMenuUI
BasicMenuUI.ChangeHandler, BasicMenuUI.MouseInputHandler
 
Field Summary
 
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
SIPCommSelectorMenuUI()
           
 
Method Summary
static ComponentUI createUI(JComponent c)
          Creates a new SIPCommSelectorMenuUI instance.
 void loadSkin()
          Reloads the background icon.
protected  void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor)
          Draws the background of the menu item.
 
Methods inherited from class javax.swing.plaf.basic.BasicMenuUI
createChangeListener, createMenuDragMouseListener, createMenuListener, createMouseInputListener, createPropertyChangeListener, getMaximumSize, getPropertyPrefix, installDefaults, installKeyboardActions, installListeners, setupPostTimer, uninstallDefaults, uninstallKeyboardActions, uninstallListeners
 
Methods inherited from class javax.swing.plaf.basic.BasicMenuItemUI
createMenuKeyListener, doClick, getMinimumSize, getPath, getPreferredMenuItemSize, getPreferredSize, installComponents, installUI, paint, paintMenuItem, 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
 

Constructor Detail

SIPCommSelectorMenuUI

public SIPCommSelectorMenuUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)
Creates a new SIPCommSelectorMenuUI instance.

Parameters:
c - the component for which we create the UI
Returns:
the created ComponentUI

paintBackground

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

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

loadSkin

public void loadSkin()
Reloads the background icon.

Specified by:
loadSkin in interface Skinnable

SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.