Worker.State
Modifier and Type | Field and Description |
---|---|
private ReadOnlyObjectWrapper<java.lang.Throwable> |
exception |
private ReadOnlyStringWrapper |
message |
private ReadOnlyDoubleWrapper |
progress |
private ReadOnlyBooleanWrapper |
running |
private ReadOnlyObjectWrapper<Worker.State> |
state |
private ReadOnlyStringWrapper |
title |
private ReadOnlyDoubleWrapper |
totalWorkToBeDone |
private ReadOnlyObjectWrapper<java.lang.Void> |
value |
private ReadOnlyDoubleWrapper |
workDone |
Modifier | Constructor and Description |
---|---|
private |
LoadWorker() |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel()
Cancels the loading of the page.
|
private void |
cancelAndReset() |
private java.lang.Throwable |
describeError(int errorCode) |
private void |
dispatchLoadEvent(long frame,
int state,
java.lang.String url,
java.lang.String contentType,
double workDone,
int errorCode) |
ReadOnlyObjectProperty<java.lang.Throwable> |
exceptionProperty()
Gets the ReadOnlyObjectProperty representing any exception which occurred.
|
java.lang.Throwable |
getException()
Indicates the exception which occurred while the Worker was running, if any.
|
java.lang.String |
getMessage()
Gets a message associated with the current state of this Worker.
|
double |
getProgress()
Indicates the current progress of this Worker in terms of percent complete.
|
Worker.State |
getState()
Specifies the current state of this Worker.
|
java.lang.String |
getTitle()
An optional title that should be associated with this Worker.
|
double |
getTotalWork()
Indicates a maximum value for the
Worker.workDoneProperty() property. |
java.lang.Void |
getValue()
Specifies the value, or result, of this Worker.
|
double |
getWorkDone()
Indicates the current amount of work that has been completed.
|
boolean |
isRunning()
True if the state is either SCHEDULED or RUNNING.
|
ReadOnlyStringProperty |
messageProperty()
Gets the ReadOnlyStringProperty representing the message.
|
ReadOnlyDoubleProperty |
progressProperty()
Gets the ReadOnlyDoubleProperty representing the progress.
|
ReadOnlyBooleanProperty |
runningProperty()
Gets the ReadOnlyBooleanProperty representing whether the Worker is running.
|
ReadOnlyObjectProperty<Worker.State> |
stateProperty()
Gets the ReadOnlyObjectProperty representing the current state.
|
ReadOnlyStringProperty |
titleProperty()
Gets the ReadOnlyStringProperty representing the title.
|
ReadOnlyDoubleProperty |
totalWorkProperty()
Gets the ReadOnlyDoubleProperty representing the maximum amount of work
that needs to be done.
|
private void |
updateProgress(double p) |
private void |
updateState(Worker.State value) |
ReadOnlyObjectProperty<java.lang.Void> |
valueProperty()
Gets the ReadOnlyObjectProperty representing the value.
|
ReadOnlyDoubleProperty |
workDoneProperty()
Gets the ReadOnlyDoubleProperty representing the current progress.
|
private final ReadOnlyObjectWrapper<Worker.State> state
private final ReadOnlyObjectWrapper<java.lang.Void> value
private final ReadOnlyObjectWrapper<java.lang.Throwable> exception
private final ReadOnlyDoubleWrapper workDone
private final ReadOnlyDoubleWrapper totalWorkToBeDone
private final ReadOnlyDoubleWrapper progress
private final ReadOnlyBooleanWrapper running
private final ReadOnlyStringWrapper message
private final ReadOnlyStringWrapper title
public final Worker.State getState()
Worker
public final ReadOnlyObjectProperty<Worker.State> stateProperty()
Worker
stateProperty
in interface Worker<java.lang.Void>
private void updateState(Worker.State value)
public final java.lang.Void getValue()
Worker
public final ReadOnlyObjectProperty<java.lang.Void> valueProperty()
Worker
valueProperty
in interface Worker<java.lang.Void>
public final java.lang.Throwable getException()
Worker
null
, there is no known exception, even if
the status is FAILED. If this property is not null
, it will most
likely contain an exception that describes the cause of failure.getException
in interface Worker<java.lang.Void>
public final ReadOnlyObjectProperty<java.lang.Throwable> exceptionProperty()
Worker
exceptionProperty
in interface Worker<java.lang.Void>
public final double getWorkDone()
Worker
getWorkDone
in interface Worker<java.lang.Void>
Worker.totalWorkProperty()
,
Worker.progressProperty()
public final ReadOnlyDoubleProperty workDoneProperty()
Worker
workDoneProperty
in interface Worker<java.lang.Void>
public final double getTotalWork()
Worker
Worker.workDoneProperty()
property. The
totalWork will either be -1 (indicating that the amount of work
to do is indeterminate), or it will be a non-zero value less than or
equal to Double.MAX_VALUE.getTotalWork
in interface Worker<java.lang.Void>
Worker.workDoneProperty()
,
Worker.progressProperty()
public final ReadOnlyDoubleProperty totalWorkProperty()
Worker
totalWorkProperty
in interface Worker<java.lang.Void>
public final double getProgress()
Worker
getProgress
in interface Worker<java.lang.Void>
Worker.workDoneProperty()
,
Worker.totalWorkProperty()
public final ReadOnlyDoubleProperty progressProperty()
Worker
progressProperty
in interface Worker<java.lang.Void>
private void updateProgress(double p)
public final boolean isRunning()
Worker
ProgressIndicator
, you will typically bind the visibility
of the ProgressIndicator to the Worker's running property, and the progress of the
ProgressIndicator to the Worker's progress property.public final ReadOnlyBooleanProperty runningProperty()
Worker
runningProperty
in interface Worker<java.lang.Void>
public final java.lang.String getMessage()
Worker
getMessage
in interface Worker<java.lang.Void>
public final ReadOnlyStringProperty messageProperty()
Worker
messageProperty
in interface Worker<java.lang.Void>
public final java.lang.String getTitle()
Worker
public final ReadOnlyStringProperty titleProperty()
Worker
titleProperty
in interface Worker<java.lang.Void>
public boolean cancel()
private void cancelAndReset()
private void dispatchLoadEvent(long frame, int state, java.lang.String url, java.lang.String contentType, double workDone, int errorCode)
private java.lang.Throwable describeError(int errorCode)