| java.lang.Object javax.swing.PopupFactory com.jgoodies.looks.common.ShadowPopupFactory
Field Summary | |
final static String | PROP_HORIZONTAL_BACKGROUND In the case of heavy weight popups, snapshots of the screen background
will be stored as client properties of the popup contents' parent.
These snapshots will be used by the popup border to simulate the drop
shadow effect. | final static String | PROP_VERTICAL_BACKGROUND |
Method Summary | |
public Popup | getPopup(Component owner, Component contents, int x, int y) Creates a Popup for the Component owner
containing the Component contents . | public static void | install() Installs the ShadowPopupFactory as the shared popup factory
on non-Mac platforms. | public static void | uninstall() Uninstalls the ShadowPopupFactory and restores the original
popup factory as the new shared popup factory. |
PROP_HORIZONTAL_BACKGROUND | final static String PROP_HORIZONTAL_BACKGROUND(Code) | | In the case of heavy weight popups, snapshots of the screen background
will be stored as client properties of the popup contents' parent.
These snapshots will be used by the popup border to simulate the drop
shadow effect. The two following constants define the names of
these client properties.
See Also: com.jgoodies.looks.common.ShadowPopupBorder |
PROP_VERTICAL_BACKGROUND | final static String PROP_VERTICAL_BACKGROUND(Code) | | |
getPopup | public Popup getPopup(Component owner, Component contents, int x, int y) throws IllegalArgumentException(Code) | | Creates a Popup for the Component owner
containing the Component contents . In addition to
the superclass behavior, we try to return a Popup that has a drop shadow,
if popup drop shadows are active - as returned by
Options#isPopupDropShadowActive .
owner is used to determine which Window the new
Popup will parent the Component the
Popup creates to. A null owner implies there
is no valid parent. x and
y specify the preferred initial location to place
the Popup at. Based on screen size, or other paramaters,
the Popup may not display at x and
y .
We invoke the super #getPopup , not the one in the
stored factory, because the popup type is set in this instance,
not in the stored one.
Parameters: owner - Component mouse coordinates are relative to, may be null Parameters: contents - Contents of the Popup Parameters: x - Initial x screen coordinate Parameters: y - Initial y screen coordinate Popup containing Contents throws: IllegalArgumentException - if contents is null See Also: Options.isPopupDropShadowActive |
install | public static void install()(Code) | | Installs the ShadowPopupFactory as the shared popup factory
on non-Mac platforms. Also stores the previously set factory,
so that it can be restored in #uninstall .
In some Mac Java environments the popup factory throws
a NullPointerException when we call #getPopup .
TODO: The Mac case shows that we may have problems replacing
non PopupFactory instances. Therefore we should consider
replacing only instances of PopupFactory.
See Also: ShadowPopupFactory.uninstall() |
uninstall | public static void uninstall()(Code) | | Uninstalls the ShadowPopupFactory and restores the original
popup factory as the new shared popup factory.
See Also: ShadowPopupFactory.install() |
|
|