|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.javatest.util.MainFrame
public class MainFrame
This class provides a means whereby tools in Personal Java can temporarily give access to a shared GUI frame, such as the one top-level Frame.
Constructor Summary | |
---|---|
MainFrame()
|
Method Summary | |
---|---|
static java.awt.Frame |
acquireFrame()
Try to acquire exclusive access to a shared context previously registered with @link(#setContext). |
static java.awt.Container |
getContext()
Deprecated. replaced by acquireFrame. |
static void |
releaseFrame(java.awt.Frame f)
Release access to the previously acquired frame. |
static void |
restoreContext(java.awt.Container c)
Deprecated. replaced by releaseFrame. |
static void |
setContext(java.awt.Container c)
Deprecated. replaced by @link(#setFrame) |
static void |
setFrame(java.awt.Frame f)
Set a frame that can be subsequently accessed via @link(#acquireFrame) and @link(#releaseFrame). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MainFrame()
Method Detail |
---|
public static void setContext(java.awt.Container c)
c
- The container to be registered
java.lang.ClassCastException
- if the container being registered is not a framegetContext()
public static void setFrame(java.awt.Frame f)
f
- The container to be registeredpublic static java.awt.Container getContext()
setContext(java.awt.Container)
public static java.awt.Frame acquireFrame() throws java.lang.InterruptedException
java.lang.InterruptedException
- if the thread is interrupted while waiting
for the context to become available.releaseFrame(java.awt.Frame)
public static void restoreContext(java.awt.Container c)
c
- The result of previously calling @link(#acquireContext).
java.lang.IllegalStateException
- if the argument is not the result of
calling @link(#acquireFrame), or if it has already been released.
java.lang.ClassCastException
- if the container is not a frame.public static void releaseFrame(java.awt.Frame f)
f
- The result of previously calling @link(#acquireFrame).
java.lang.IllegalStateException
- if the argument is not the result of
calling @link(#acquireFrame), or if it has already been released.acquireFrame()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |