|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.plaf.common.ShadowPopupBorder
A border with a nice looking drop shadow, intended to be used as the outer border of popup menus. Can snapshot and paint the screen background if used with heavy-weight popup windows.
ShadowPopupMenuUtils
,
Robot
Constructor Summary | |
ShadowPopupBorder()
|
Method Summary | |
static void |
clearSnapshot()
The next time the border is drawn no background snaphot is used. |
Insets |
getBorderInsets(Component c)
Returns the insets of the border. |
static ShadowPopupBorder |
getInstance()
Returns the singleton instance used to draw all borders. |
boolean |
isBorderOpaque()
Returns whether or not the border is opaque. |
static void |
makeSnapshot(JWindow window)
Snapshots the background. |
void |
paintBorder(Component c,
Graphics g,
int x,
int y,
int width,
int height)
Paints the border for the specified component with the specified position and size. |
static void |
setActive(boolean b)
Activates or deactivates the drop shadow feature. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ShadowPopupBorder()
Method Detail |
public static ShadowPopupBorder getInstance()
public static void setActive(boolean b)
b
- true to activate, false to deactivate drop shadowspublic static void clearSnapshot()
public static void makeSnapshot(JWindow window)
Uses a robot on the default screen device to capture the screen region under the drop shadow. Does not use the window's device, because that may be an outdated device (due to popup reuse) and the robot's origin seems to be adjusted with the default screen device.
Unfortunately under certain circumstances we don't get the background but a previous menu, still on the screen. Use light weight menus to work around this limitation.
public boolean isBorderOpaque()
isBorderOpaque
in interface Border
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
paintBorder
in interface Border
public Insets getBorderInsets(Component c)
getBorderInsets
in interface Border
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |