|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectabbot.util.AWT
Various AWT utilities.
Field Summary | |
static int |
POPUP_TIMEOUT
|
Method Summary | |
static List |
disableHierarchy(Component root)
Disable a component hierarchy starting at the given component. |
static void |
dismissAWTPopup()
|
static boolean |
eventTypeEnabled(Component c,
int id)
WARNING: This uses 1.3/1.4 implementation details. |
static JPopupMenu |
findActivePopupMenu()
Find the currently active Swing popup menu, if any, waiting up to POPUP_TIMEOUT ms. |
static Applet |
findAppletDescendent(Container c)
Returns the Applet descendent of the given Container, if any. |
static MenuItem[] |
findAWTMenuItems(Frame frame,
String path)
Returns all MenuItems matching the given label or path which are found in the given Frame's MenuBar. |
static MenuItem[] |
findAWTPopupMenuItems(Component parent,
String path)
Returns all MenuItems matching the given label or path which are on PopupMenus on the given Component. |
static JPopupMenu |
getActivePopupMenu()
Returns the currently active popup menu, if any. |
static sun.awt.AppContext |
getAppContext(Component c)
For debugging purposes only. |
static Component |
getFocusOwner()
Return the focus owner under the given Window. |
static Component |
getInvoker(Component comp)
Returns the invoker, if any, of the given component. |
static Component |
getInvoker(MenuComponent mc)
Returns the invoker, if any, of the given AWT menu component. |
static Point |
getLocationOnScreen(Component c)
Returns the location of the given components in screen coordinates. |
static String |
getPath(MenuItem item)
Returns a unique path to the given MenuItem. |
static int |
getPopupMask()
Returns the InputEvent mask for the popup trigger button. |
static PopupMenu[] |
getPopupMenus(Component c)
Return all AWT popup menus associated with the given component. |
static boolean |
getPopupOnPress()
Returns whether the platform registers a popup on mouse press. |
static int |
getTertiaryMask()
Returns the InputEvent mask for the tertiary button. |
static Window |
getWindow(Component comp)
Similar to SwingUtilities.getWindowAncestor(), but returns the component itself if it is a Window, or the invoker's window if on a popup. |
static boolean |
hasDefaultName(Component c)
Return whether the given Component has only its default name set. |
static void |
invokeAction(Runnable action)
Ensure the given action happens on the event dispatch thread. |
static void |
invokeAndWait(Runnable action)
Ensure the given action happens on the event dispatch thread. |
static boolean |
isAWTPopupMenuBlocking()
Returns whether there is an AWT popup menu currently showing. |
static boolean |
isAWTTreeLockHeld()
Returns whether the AWT Tree Lock is currently held. |
static boolean |
isContentPane(Component c)
Returns whether the given Component is the content pane for a RootPaneContainer . |
static boolean |
isEventQueueBlocked()
|
static boolean |
isGlassPane(Component c)
Returns whether the given Component is the Glass Pane for a JRootPane . |
static boolean |
isHeavyweightPopup(Component c)
Returns whether the given component is a heavyweight popup, that is, a container for a JPopupMenu that is implemented with a heavyweight component (usually a Window). |
static boolean |
isInternalFrameDecoration(Component c)
Return whether the given component is part of an internal frame's LAF decoration. |
static boolean |
isLightweightPopup(Component c)
Returns whether the given component is a lightweight popup, that is, a container for a JPopupMenu that is implemented with a lightweight component (usually JPanel). |
static boolean |
isOnMenuBar(MenuComponent mc)
Returns whether the menu component is on a MenuBar. |
static boolean |
isOnPopup(Component comp)
Returns whether the given component is on a top-level popup. |
static boolean |
isOnPopup(MenuComponent mc)
Returns whether the given MenuComponent is on a top-level AWT popup (that is, not under a MenuBar. |
static boolean |
isSharedInvisibleFrame(Component c)
Is the given component the default Swing hidden frame? |
static boolean |
isToolTip(Component c)
Return whether the given component is part of the transient wrapper around a tooltip. |
static boolean |
isTransientDialog(Component c)
Return whether the given component is part of a transient dialog. |
static boolean |
isTransientPopup(Component c)
Return whether the given component is part of the transient wrapper around a popup. |
static void |
reenableHierarchy(List enabled)
Restore the enabled state. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int POPUP_TIMEOUT
Method Detail |
public static boolean hasDefaultName(Component c)
public static void invokeAndWait(Runnable action)
public static void invokeAction(Runnable action)
public static void reenableHierarchy(List enabled)
public static List disableHierarchy(Component root)
public static boolean isOnMenuBar(MenuComponent mc)
public static Component getInvoker(MenuComponent mc)
public static Component getInvoker(Component comp)
public static Window getWindow(Component comp)
public static boolean isAWTPopupMenuBlocking()
public static boolean isEventQueueBlocked()
public static boolean isAWTTreeLockHeld()
public static void dismissAWTPopup()
public static boolean isOnPopup(MenuComponent mc)
public static boolean isOnPopup(Component comp)
public static boolean isHeavyweightPopup(Component c)
public static boolean isLightweightPopup(Component c)
public static boolean isContentPane(Component c)
RootPaneContainer
.
RootPaneContainer.getContentPane()
public static boolean isGlassPane(Component c)
JRootPane
.
JRootPane.getGlassPane()
public static boolean isTransientPopup(Component c)
public static boolean isToolTip(Component c)
public static boolean isInternalFrameDecoration(Component c)
public static int getPopupMask()
public static int getTertiaryMask()
public static boolean getPopupOnPress()
public static PopupMenu[] getPopupMenus(Component c)
public static MenuItem[] findAWTPopupMenuItems(Component parent, String path)
public static MenuItem[] findAWTMenuItems(Frame frame, String path)
public static String getPath(MenuItem item)
public static Component getFocusOwner()
public static sun.awt.AppContext getAppContext(Component c)
public static boolean eventTypeEnabled(Component c, int id)
public static boolean isSharedInvisibleFrame(Component c)
public static JPopupMenu getActivePopupMenu()
public static JPopupMenu findActivePopupMenu()
public static Point getLocationOnScreen(Component c)
public static boolean isTransientDialog(Component c)
Note that it is possible to use JOptionPane.createDialog to create a reusable dialog, so just because it's transient doesn't mean it will be disposed of when it is hidden.
Note that this won't detect transient Dialogs after their components have been reassigned to a new transient Dialog.
public static Applet findAppletDescendent(Container c)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |