com.jgoodies.plaf.common
Class ShadowPopupMenuUtils
java.lang.Object
com.jgoodies.plaf.common.ShadowPopupMenuUtils
- public final class ShadowPopupMenuUtils
- extends Object
A helper class used to implements drop shadows for popup menus.
Hooked into the creation of either the light weight or heavy weight
JPopupMenu
container. Either removes its opaqueness
or creates a background snapshot to create the illusion that menus
can shadow even parts of the screen outside the menu's window.
Unfortunately this illusion isn't perfect.
We need access to javax.swing.Popup#getComponent()
and require
java.lang.reflect.AccessibleObject#ACCESS_PERMISSION
to do so.
If this code is executed with some security manager set, it will fail
silently and drop shadow support is inactive.
- Version:
- $Revision: 1.4 $
- Author:
- Stefan Matthias Aust, Karsten Lentzsch
- See Also:
ShadowPopupBorder
Method Summary |
static void |
setTransparent(JPopupMenu popupMenu,
Popup popup)
Returns the Popup that will be responsible for displaying the JPopupMenu.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShadowPopupMenuUtils
public ShadowPopupMenuUtils()
setTransparent
public static void setTransparent(JPopupMenu popupMenu,
Popup popup)
- Returns the Popup that will be responsible for displaying the JPopupMenu.
Overwritten to fix the opaqueness of the component in the case of light weight
menus and to make a background snapshot to simulate the shadows in the case of
heavy weight menus.
Copyright © 2001-2004 JGoodies Karsten Lentzsch. All Rights Reserved.