|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.monitorenter.util.UIUtil
public final class UIUtil
Utility class for UI / layout operations.
Method Summary | |
---|---|
static java.awt.Window |
findDialogWindow(java.awt.Component component)
Finds the window of the given component. |
static java.awt.Frame |
findFrame(java.awt.Component component)
Finds the frame of the given component. |
static javax.swing.JPopupMenu |
findPopupMenu(java.awt.Component component)
Finds the parent JPopupMenu of the given component, it it is
contained in the component tree of one. |
static javax.swing.JPopupMenu |
findTopLevelPopupMenu(java.awt.Component component)
Finds the top level parent JPopupMenu of the given component,
it it is contained in the component tree of one. |
static java.awt.Point |
getLocationOnScreen(java.awt.event.MouseEvent e)
Deprecated. Replace with Point.getLocationOnScreen(MouseEvent) as soon as jdk 1.6 is used. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.awt.Window findDialogWindow(java.awt.Component component)
This will be the top-level frame for components that are contained directly
in that window. For components that are contained in
windows the dialog window will be
returned. For components that are contained in
Dialog
trees the window that triggers that
menu will be returned.
JMenu
component
- the component to find the master the JFrame of.
public static java.awt.Frame findFrame(java.awt.Component component)
The component may be contained in a
(with support for modal dialogs) and still it's frame (the top level window
of the application) will be found. Support for components launched from
JDialog
instances is included.
JPopupMenu
This also works for nested
/
JMenu
trees.
JMenuItem
component
- the component to find the master the JFrame of.
public static javax.swing.JPopupMenu findPopupMenu(java.awt.Component component)
JPopupMenu
of the given component, it it is
contained in the component tree of one.
component
- a potential sub component of a popup menu.
public static javax.swing.JPopupMenu findTopLevelPopupMenu(java.awt.Component component)
JPopupMenu
of the given component,
it it is contained in the component tree of one.
JPopupMenu
trees may contain many sub menu instances.
component
- a potential sub component of a popup menu.
@Deprecated public static java.awt.Point getLocationOnScreen(java.awt.event.MouseEvent e)
Point#getLocationOnScreen(MouseEvent e)
in pre jdk
1dot6.
e
- needed to get the location on screen of.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |