com.jgoodies.plaf.windows
Class ExtWindowsPopupMenuUI

java.lang.Object
  extended byjavax.swing.plaf.ComponentUI
      extended byjavax.swing.plaf.PopupMenuUI
          extended byjavax.swing.plaf.basic.BasicPopupMenuUI
              extended bycom.sun.java.swing.plaf.windows.WindowsPopupMenuUI
                  extended bycom.jgoodies.plaf.windows.ExtWindowsPopupMenuUI

public final class ExtWindowsPopupMenuUI
extends com.sun.java.swing.plaf.windows.WindowsPopupMenuUI

The JGoodies Windows l&f implementation of PopupMenuUI. Adds support for a drop shadow. Intended to be used in conjunction with class ShadowPopupBorder.

Overwrites #getPopup to either set light-weight popup menu and the popup's component to transparent, or to snapshot the background in case of a heavy-weight menu. Must

Version:
$Revision: 1.3 $
Author:
Karsten Lentzsch
See Also:
ShadowPopupBorder, ShadowPopupMenuUtils

Field Summary
 
Fields inherited from class javax.swing.plaf.basic.BasicPopupMenuUI
popupMenu
 
Constructor Summary
ExtWindowsPopupMenuUI()
           
 
Method Summary
static ComponentUI createUI(JComponent x)
          Creates an instance of the ui delegate for the specified component.
 Popup getPopup(JPopupMenu aPopupMenu, int x, int y)
          Returns the Popup that will be responsible for displaying the JPopupMenu.
 void installDefaults()
          Unlike the superclass, we install a plain border or drop shadow border depending on the current setting of the UIManager setting "PopupMenu.dropShadowEnabled" and other conditions; for example, the feature is always inactive on the Mac OS X.
 
Methods inherited from class com.sun.java.swing.plaf.windows.WindowsPopupMenuUI
installListeners
 
Methods inherited from class javax.swing.plaf.basic.BasicPopupMenuUI
getMaximumSize, getMinimumSize, getPreferredSize, installKeyboardActions, installUI, isPopupTrigger, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, paint, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtWindowsPopupMenuUI

public ExtWindowsPopupMenuUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent x)
Creates an instance of the ui delegate for the specified component.


installDefaults

public void installDefaults()
Unlike the superclass, we install a plain border or drop shadow border depending on the current setting of the UIManager setting "PopupMenu.dropShadowEnabled" and other conditions; for example, the feature is always inactive on the Mac OS X.


getPopup

public Popup getPopup(JPopupMenu aPopupMenu,
                      int x,
                      int y)
Returns the Popup that will be responsible for displaying the JPopupMenu. Overwritten to make the popup component transparent (light-weight), or make a background snapshot to simulate the shadows (heavy-weight).

The snapshot will be used by class ShadowPopupBorder.



Copyright © 2001-2004 JGoodies Karsten Lentzsch. All Rights Reserved.