Package org.loboevolution.pdfview
Interface Watchable
- All Known Implementing Classes:
BaseWatchable
,PDFParser
,PDFRenderer
public interface Watchable
An interface for rendering or parsing, which can be stopped and started.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
ConstantCOMPLETED=6
static final int
ConstantERROR=7
static final int
ConstantNEEDS_DATA=3
static final int
ConstantNOT_STARTED=1
static final int
ConstantPAUSED=2
static final int
ConstantRUNNING=4
static final int
ConstantSTOPPED=5
static final int
the possible statuses -
Method Summary
Modifier and TypeMethodDescriptionint
Get the status of this watchablevoid
go()
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.void
stop()
Stop this watchable.
-
Field Details
-
UNKNOWN
static final int UNKNOWNthe possible statuses- See Also:
-
NOT_STARTED
static final int NOT_STARTEDConstantNOT_STARTED=1
- See Also:
-
PAUSED
static final int PAUSEDConstantPAUSED=2
- See Also:
-
NEEDS_DATA
static final int NEEDS_DATAConstantNEEDS_DATA=3
- See Also:
-
RUNNING
static final int RUNNINGConstantRUNNING=4
- See Also:
-
STOPPED
static final int STOPPEDConstantSTOPPED=5
- See Also:
-
COMPLETED
static final int COMPLETEDConstantCOMPLETED=6
- See Also:
-
ERROR
static final int ERRORConstantERROR=7
- See Also:
-
-
Method Details
-
getStatus
int getStatus()Get the status of this watchable- Returns:
- one of the well-known statuses
-
stop
void stop()Stop this watchable. Stop will cause all processing to cease, and the watchable to be destroyed. -
go
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
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
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
-