|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.pdfview.BaseWatchable
public abstract class BaseWatchable
An abstract implementation of the watchable interface, that is extended by the parser and renderer to do their thing.
Field Summary |
---|
Fields inherited from interface com.sun.pdfview.Watchable |
---|
COMPLETED, ERROR, NEEDS_DATA, NOT_STARTED, PAUSED, RUNNING, STOPPED, UNKNOWN |
Constructor Summary | |
---|---|
protected |
BaseWatchable()
Creates a new instance of BaseWatchable |
Method Summary | |
---|---|
protected void |
cleanup()
Clean up after a set of iterations. |
protected void |
execute(boolean synchronous)
Start executing this watchable |
int |
getStatus()
Get the status of this watchable |
void |
go()
Start this watchable and run in a new thread until it is finished or stopped. |
void |
go(boolean synchronous)
Start this watchable and run until it is finished or stopped. |
void |
go(int steps)
Start this watchable and run for the given number of steps or until finished or stopped. |
void |
go(long millis)
Start this watchable and run for the given amount of time, or until finished or stopped. |
boolean |
isExecutable()
return true if this watchable is ready to be executed |
boolean |
isFinished()
Return whether this watchable has finished. |
static boolean |
isSuppressSetErrorStackTrace()
return true if we would be suppressing setError stack traces. |
protected abstract int |
iterate()
Perform a single iteration of this watchable. |
void |
run()
|
protected void |
setError(java.lang.Exception error)
Set an error on this watchable |
protected void |
setStatus(int status)
Set the status of this watchable |
static void |
setSuppressSetErrorStackTrace(boolean suppressTrace)
set suppression of stack traces from setError. |
protected void |
setup()
Prepare for a set of iterations. |
void |
stop()
Stop this watchable. |
void |
waitForFinish()
Wait for this watchable to finish |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected BaseWatchable()
Method Detail |
---|
protected abstract int iterate() throws java.lang.Exception
java.lang.Exception
protected void setup()
protected void cleanup()
public void run()
run
in interface java.lang.Runnable
public int getStatus()
getStatus
in interface Watchable
public boolean isFinished()
public boolean isExecutable()
public void stop()
stop
in interface Watchable
public void go()
go
in interface Watchable
public void go(boolean synchronous)
synchronous
- if true, run in this threadpublic void go(int steps)
go
in interface Watchable
steps
- the number of steps to run forpublic void go(long millis)
go
in interface Watchable
millis
- the number of milliseconds to run forpublic void waitForFinish()
protected void execute(boolean synchronous)
synchronous
- if true, run in this threadprotected void setStatus(int status)
public static boolean isSuppressSetErrorStackTrace()
public static void setSuppressSetErrorStackTrace(boolean suppressTrace)
suppressTrace
- protected void setError(java.lang.Exception error)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |