java.lang.Object
org.jhotdraw8.fxbase.concurrent.BlackHoleWorkState<V>
- Type Parameters:
V- the result type of the work
- All Implemented Interfaces:
javafx.concurrent.Worker<V>,WorkState<V>
This work state does not update its properties, except for
isCancelled().
This allows to use this work state, when the FX Application Thread is not running.-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ReadOnlyObjectProperty<Throwable> javafx.beans.property.ReadOnlyStringPropertyjavafx.beans.property.ReadOnlyDoublePropertyjavafx.beans.property.ReadOnlyBooleanPropertyjavafx.beans.property.ReadOnlyObjectProperty<javafx.concurrent.Worker.State> javafx.beans.property.ReadOnlyStringPropertyjavafx.beans.property.ReadOnlyDoublePropertyjavafx.beans.property.ReadOnlyObjectProperty<V> javafx.beans.property.ReadOnlyDoubleProperty -
Nested Class Summary
Nested classes/interfaces inherited from interface javafx.concurrent.Worker
javafx.concurrent.Worker.State -
Field Summary
Fields inherited from interface org.jhotdraw8.fxbase.concurrent.WorkState
EXCEPTION_PROPERTY, MESSAGE_PROPERTY, PROGRESS_PROPERTY, RUNNING_PROPERTY, STATE_PROPERTY, TITLE_PROPERTY, TOTAL_WORK_PROPERTY, VALUE_PROPERTY, WORK_DONE_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancancel()javafx.beans.property.ReadOnlyObjectProperty<Throwable> @Nullable ThrowableGets the value of theexceptionproperty.@Nullable StringGets the value of themessageproperty.doubleGets the value of theprogressproperty.javafx.concurrent.Worker.StategetState()Gets the value of thestateproperty.@Nullable StringgetTitle()Gets the value of thetitleproperty.doubleGets the value of thetotalWorkproperty.@Nullable VgetValue()Gets the value of thevalueproperty.doubleGets the value of theworkDoneproperty.booleanReturns true if the worker associated to this work state should cancel.booleanGets the value of therunningproperty.javafx.beans.property.ReadOnlyStringPropertyjavafx.beans.property.ReadOnlyDoublePropertyjavafx.beans.property.ReadOnlyBooleanPropertyjavafx.beans.property.ReadOnlyObjectProperty<javafx.concurrent.Worker.State> javafx.beans.property.ReadOnlyStringPropertyjavafx.beans.property.ReadOnlyDoublePropertyvoidupdateException(Throwable value) Asynchronously updates the current exception of the work state.voidupdateMessage(@Nullable String value) Does nothing, because this implementation does not require that the FX Application Thread is running.voidupdateProgress(double value) Does nothing, because this implementation does not require that the FX Application Thread is running.voidupdateRunning(boolean value) Asynchronously updates the current running state of the work state.voidupdateState(javafx.concurrent.Worker.State value) Asynchronously updates the current state of the work state.voidupdateTitle(@Nullable String value) Does nothing, because this implementation does not require that the FX Application Thread is running.voidupdateValue(@Nullable Object value) Does nothing, because this implementation does not require that the FX Application Thread is running.javafx.beans.property.ReadOnlyObjectProperty<V> javafx.beans.property.ReadOnlyDoubleProperty
-
Property Details
-
state
public javafx.beans.property.ReadOnlyObjectProperty<javafx.concurrent.Worker.State> stateProperty- Specified by:
statePropertyin interfacejavafx.concurrent.Worker<V>- See Also:
-
value
- Specified by:
valuePropertyin interfacejavafx.concurrent.Worker<V>- Specified by:
valuePropertyin interfaceWorkState<V>- See Also:
-
exception
- Specified by:
exceptionPropertyin interfacejavafx.concurrent.Worker<V>- See Also:
-
workDone
public javafx.beans.property.ReadOnlyDoubleProperty workDoneProperty- Specified by:
workDonePropertyin interfacejavafx.concurrent.Worker<V>- Specified by:
workDonePropertyin interfaceWorkState<V>- See Also:
-
totalWork
public javafx.beans.property.ReadOnlyDoubleProperty totalWorkProperty- Specified by:
totalWorkPropertyin interfacejavafx.concurrent.Worker<V>- Specified by:
totalWorkPropertyin interfaceWorkState<V>- See Also:
-
progress
public javafx.beans.property.ReadOnlyDoubleProperty progressProperty- Specified by:
progressPropertyin interfacejavafx.concurrent.Worker<V>- Specified by:
progressPropertyin interfaceWorkState<V>- See Also:
-
running
public javafx.beans.property.ReadOnlyBooleanProperty runningProperty- Specified by:
runningPropertyin interfacejavafx.concurrent.Worker<V>- See Also:
-
message
public javafx.beans.property.ReadOnlyStringProperty messageProperty- Specified by:
messagePropertyin interfacejavafx.concurrent.Worker<V>- Specified by:
messagePropertyin interfaceWorkState<V>- See Also:
-
title
public javafx.beans.property.ReadOnlyStringProperty titleProperty- Specified by:
titlePropertyin interfacejavafx.concurrent.Worker<V>- Specified by:
titlePropertyin interfaceWorkState<V>- See Also:
-
-
Constructor Details
-
BlackHoleWorkState
public BlackHoleWorkState()
-
-
Method Details
-
updateMessage
Does nothing, because this implementation does not require that the FX Application Thread is running.- Specified by:
updateMessagein interfaceWorkState<V>- Parameters:
value- the new value
-
updateState
public void updateState(javafx.concurrent.Worker.State value) Description copied from interface:WorkStateAsynchronously updates the current state of the work state.Calls to this method are coalesced as described in
WorkState.updateMessage(String).- Specified by:
updateStatein interfaceWorkState<V>- Parameters:
value- the new value
-
updateException
Description copied from interface:WorkStateAsynchronously updates the current exception of the work state.Calls to this method are coalesced as described in
WorkState.updateMessage(String).- Specified by:
updateExceptionin interfaceWorkState<V>- Parameters:
value- the new value
-
updateRunning
public void updateRunning(boolean value) Description copied from interface:WorkStateAsynchronously updates the current running state of the work state.Calls to this method are coalesced as described in
WorkState.updateMessage(String).- Specified by:
updateRunningin interfaceWorkState<V>- Parameters:
value- the new value
-
updateTitle
Does nothing, because this implementation does not require that the FX Application Thread is running.- Specified by:
updateTitlein interfaceWorkState<V>- Parameters:
value- the new value
-
updateValue
Does nothing, because this implementation does not require that the FX Application Thread is running.- Specified by:
updateValuein interfaceWorkState<V>- Parameters:
value- the new value
-
updateProgress
public void updateProgress(double value) Does nothing, because this implementation does not require that the FX Application Thread is running.- Specified by:
updateProgressin interfaceWorkState<V>- Parameters:
value- the new value
-
isCancelled
public boolean isCancelled()Description copied from interface:WorkStateReturns true if the worker associated to this work state should cancel.- Specified by:
isCancelledin interfaceWorkState<V>- Returns:
- true if cancelled
-
getState
public javafx.concurrent.Worker.State getState()Gets the value of thestateproperty.- Specified by:
getStatein interfacejavafx.concurrent.Worker<V>- Property description:
- Returns:
- the value of the
stateproperty - See Also:
-
stateProperty
public javafx.beans.property.ReadOnlyObjectProperty<javafx.concurrent.Worker.State> stateProperty()- Specified by:
statePropertyin interfacejavafx.concurrent.Worker<V>- Returns:
- the
stateproperty - See Also:
-
getValue
Gets the value of thevalueproperty. -
valueProperty
- Specified by:
valuePropertyin interfacejavafx.concurrent.Worker<V>- Specified by:
valuePropertyin interfaceWorkState<V>- Returns:
- the
valueproperty - See Also:
-
getException
Gets the value of theexceptionproperty.- Specified by:
getExceptionin interfacejavafx.concurrent.Worker<V>- Property description:
- Returns:
- the value of the
exceptionproperty - See Also:
-
exceptionProperty
- Specified by:
exceptionPropertyin interfacejavafx.concurrent.Worker<V>- Returns:
- the
exceptionproperty - See Also:
-
getWorkDone
public double getWorkDone()Gets the value of theworkDoneproperty.- Specified by:
getWorkDonein interfacejavafx.concurrent.Worker<V>- Specified by:
getWorkDonein interfaceWorkState<V>- Property description:
- Returns:
- the value of the
workDoneproperty - See Also:
-
workDoneProperty
public javafx.beans.property.ReadOnlyDoubleProperty workDoneProperty()- Specified by:
workDonePropertyin interfacejavafx.concurrent.Worker<V>- Specified by:
workDonePropertyin interfaceWorkState<V>- Returns:
- the
workDoneproperty - See Also:
-
getTotalWork
public double getTotalWork()Gets the value of thetotalWorkproperty.- Specified by:
getTotalWorkin interfacejavafx.concurrent.Worker<V>- Specified by:
getTotalWorkin interfaceWorkState<V>- Property description:
- Returns:
- the value of the
totalWorkproperty - See Also:
-
totalWorkProperty
public javafx.beans.property.ReadOnlyDoubleProperty totalWorkProperty()- Specified by:
totalWorkPropertyin interfacejavafx.concurrent.Worker<V>- Specified by:
totalWorkPropertyin interfaceWorkState<V>- Returns:
- the
totalWorkproperty - See Also:
-
getProgress
public double getProgress()Gets the value of theprogressproperty.- Specified by:
getProgressin interfacejavafx.concurrent.Worker<V>- Specified by:
getProgressin interfaceWorkState<V>- Property description:
- Returns:
- the value of the
progressproperty - See Also:
-
progressProperty
public javafx.beans.property.ReadOnlyDoubleProperty progressProperty()- Specified by:
progressPropertyin interfacejavafx.concurrent.Worker<V>- Specified by:
progressPropertyin interfaceWorkState<V>- Returns:
- the
progressproperty - See Also:
-
isRunning
public boolean isRunning()Gets the value of therunningproperty.- Specified by:
isRunningin interfacejavafx.concurrent.Worker<V>- Property description:
- Returns:
- the value of the
runningproperty - See Also:
-
runningProperty
public javafx.beans.property.ReadOnlyBooleanProperty runningProperty()- Specified by:
runningPropertyin interfacejavafx.concurrent.Worker<V>- Returns:
- the
runningproperty - See Also:
-
getMessage
Gets the value of themessageproperty.- Specified by:
getMessagein interfacejavafx.concurrent.Worker<V>- Specified by:
getMessagein interfaceWorkState<V>- Property description:
- Returns:
- the value of the
messageproperty - See Also:
-
messageProperty
public javafx.beans.property.ReadOnlyStringProperty messageProperty()- Specified by:
messagePropertyin interfacejavafx.concurrent.Worker<V>- Specified by:
messagePropertyin interfaceWorkState<V>- Returns:
- the
messageproperty - See Also:
-
getTitle
Gets the value of thetitleproperty. -
titleProperty
public javafx.beans.property.ReadOnlyStringProperty titleProperty()- Specified by:
titlePropertyin interfacejavafx.concurrent.Worker<V>- Specified by:
titlePropertyin interfaceWorkState<V>- Returns:
- the
titleproperty - See Also:
-
cancel
public boolean cancel()- Specified by:
cancelin interfacejavafx.concurrent.Worker<V>
-