public class JRunner
extends java.lang.Object
Constructor and Description |
---|
JRunner(java.lang.Object exposedObj)
Create a JRunner instance with given reference to a class instance.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Continue the halted thread and block until the thread is dead.
|
void |
cancel(long millis)
Continue the halted thread and wait for the thread to die at most the given
time (in ms).
|
void |
join()
Block until the internal thread dies.
|
void |
join(long millis)
Wait for the internal thread to die at most the given time (in ms).
|
void |
resume()
Continue the halted thread.
|
void |
run(java.lang.String methodName)
Create a thread and invoke the parameterless method with given name.
|
boolean |
waitIfRequested()
Halt temporarily the execution of the internal thread if it was requested
by calling waitRequest() and block until cancel() or resume() is called.
|
void |
waitRequest()
Set the waitRequest flag.
|
void |
waitRequest(boolean wait)
Clear or set the waitRequest flag.
|
public JRunner(java.lang.Object exposedObj)
public void run(java.lang.String methodName)
void done(String methodName)
, done() is called with its
corresponding methodName. done() is invoked by the event dispatch
thread (EDT), so that Swing methods may be called directly.void killed(String methodName)
, killed() is called with its
corresponding methodName. killed() is invoked by the event dispatch
thread (EDT), so that Swing methods may be called directly.public void join(long millis)
join()
public void join()
join(long)
public boolean waitIfRequested()
waitRequest()
,
cancel()
,
resume()
public void resume()
waitRequest()
public void cancel(long millis)
cancel()
,
waitRequest()
public void cancel()
cancel(long)
,
waitRequest()
public void waitRequest()
waitIfRequested()
public void waitRequest(boolean wait)
waitIfRequested()