com.sun.pdfview

Interface Watchable

public interface Watchable

An interface for rendering or parsing, which can be stopped and started.
Field Summary
static intCOMPLETED
static intERROR
static intNEEDS_DATA
static intNOT_STARTED
static intPAUSED
static intRUNNING
static intSTOPPED
static intUNKNOWN
the possible statuses
Method Summary
intgetStatus()
Get the status of this watchable
voidgo()
Start this watchable and run until it is finished or stopped.
voidgo(int steps)
Start this watchable and run for the given number of steps or until finished or stopped.
voidgo(long millis)
Start this watchable and run for the given amount of time, or until finished or stopped.
voidstop()
Stop this watchable.

Field Detail

COMPLETED

public static final int COMPLETED

ERROR

public static final int ERROR

NEEDS_DATA

public static final int NEEDS_DATA

NOT_STARTED

public static final int NOT_STARTED

PAUSED

public static final int PAUSED

RUNNING

public static final int RUNNING

STOPPED

public static final int STOPPED

UNKNOWN

public static final int UNKNOWN
the possible statuses

Method Detail

getStatus

public int getStatus()
Get the status of this watchable

Returns: one of the well-known statuses

go

public void go()
Start this watchable and run until it is finished or stopped. Note the watchable may be stopped if go() with a different time is called during execution.

go

public void go(int steps)
Start this watchable and run for the given number of steps or until finished or stopped.

Parameters: steps the number of steps to run for

go

public void go(long millis)
Start this watchable and run for the given amount of time, or until finished or stopped.

Parameters: millis the number of milliseconds to run for

stop

public void stop()
Stop this watchable. Stop will cause all processing to cease, and the watchable to be destroyed.