- java.lang.Object
-
- javafx.beans.binding.ObjectExpression<T>
-
- javafx.beans.property.ReadOnlyObjectProperty<T>
-
- javafx.beans.property.ObjectProperty<T>
-
- javafx.beans.property.ObjectPropertyBase<T>
-
- javafx.beans.property.SimpleObjectProperty<T>
-
- com.gluonhq.connect.GluonObservableObject<T>
-
- Type Parameters:
T- the type of the object that is held in this observable
- All Implemented Interfaces:
GluonObservable,Observable,Property<T>,ReadOnlyProperty<T>,ObservableObjectValue<T>,ObservableValue<T>,WritableObjectValue<T>,WritableValue<T>,EventTarget
- Direct Known Subclasses:
GluonObservableObjectImpl,GluonObservableRemoteFunctionObjectImpl
public class GluonObservableObject<T> extends SimpleObjectProperty<T> implements GluonObservable, WritableObjectValue<T>
A GluonObservableObject is an ObservableObject that is linked with a data source.
-
-
Property Summary
Properties Type Property Description ReadOnlyObjectProperty<Throwable>exceptionHolds the exception that was thrown when a synchronization operation failed.ReadOnlyBooleanPropertyinitializedA boolean property that is true when the observable has been initialized successfully after its initial retrieval.ReadOnlyObjectProperty<ConnectState>stateHolds the current state of this observable.
-
Constructor Summary
Constructors Constructor Description GluonObservableObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EventDispatchChainbuildEventDispatchChain(EventDispatchChain tail)ReadOnlyObjectProperty<Throwable>exceptionProperty()Holds the exception that was thrown when a synchronization operation failed.ThrowablegetException()Gets the value of the property exception.ConnectStategetState()Gets the value of the property state.ReadOnlyBooleanPropertyinitializedProperty()A boolean property that is true when the observable has been initialized successfully after its initial retrieval.booleanisInitialized()Gets the value of the property initialized.voidsetException(Throwable exception)Sets the value of the property exception.voidsetOnCancelled(EventHandler<ConnectStateEvent> value)The onCancelled event handler is called whenever the GluonObservable state transitions to the CANCELLED state.voidsetOnFailed(EventHandler<ConnectStateEvent> value)The onFailed event handler is called whenever the GluonObservable state transitions to the FAILED state.voidsetOnReady(EventHandler<ConnectStateEvent> value)The onReady event handler is called whenever the GluonObservable state transitions to the READY state.voidsetOnRemoved(EventHandler<ConnectStateEvent> value)The onRemoved event handler is called whenever the GluonObservable state transitions to the REMOVED state.voidsetOnRunning(EventHandler<ConnectStateEvent> value)The onRunning event handler is called whenever the GluonObservable state transitions to the RUNNING state.voidsetOnSucceeded(EventHandler<ConnectStateEvent> value)The onSucceeded event handler is called whenever the GluonObservable state transitions to the SUCCEEDED state.voidsetState(ConnectState state)Sets the value of the property state.ReadOnlyObjectProperty<ConnectState>stateProperty()Holds the current state of this observable.-
Methods inherited from class javafx.beans.property.SimpleObjectProperty
getBean, getName
-
Methods inherited from class javafx.beans.property.ObjectPropertyBase
addListener, addListener, bind, fireValueChangedEvent, get, invalidated, isBound, removeListener, removeListener, set, toString, unbind
-
Methods inherited from class javafx.beans.property.ObjectProperty
bindBidirectional, setValue, unbindBidirectional
-
Methods inherited from class javafx.beans.binding.ObjectExpression
asString, asString, asString, getValue, isEqualTo, isEqualTo, isNotEqualTo, isNotEqualTo, isNotNull, isNull, objectExpression
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javafx.beans.value.ObservableValue
flatMap, getValue, map, orElse
-
Methods inherited from interface javafx.beans.value.WritableObjectValue
get, set
-
Methods inherited from interface javafx.beans.value.WritableValue
getValue, setValue
-
-
-
-
Property Detail
-
initialized
public ReadOnlyBooleanProperty initializedProperty
- Specified by:
initializedPropertyin interfaceGluonObservable- See Also:
isInitialized()
-
state
public ReadOnlyObjectProperty<ConnectState> stateProperty
- Specified by:
statePropertyin interfaceGluonObservable- See Also:
getState(),setState(ConnectState)
-
exception
public ReadOnlyObjectProperty<Throwable> exceptionProperty
- Specified by:
exceptionPropertyin interfaceGluonObservable- See Also:
getException(),setException(Throwable)
-
-
Method Detail
-
isInitialized
public boolean isInitialized()
Gets the value of the property initialized.- Specified by:
isInitializedin interfaceGluonObservable- Property description:
- Returns:
- true when the observable is initialized; false otherwise.
-
initializedProperty
public ReadOnlyBooleanProperty initializedProperty()
Description copied from interface:GluonObservableA boolean property that is true when the observable has been initialized successfully after its initial retrieval.- Specified by:
initializedPropertyin interfaceGluonObservable- See Also:
isInitialized()
-
getState
public ConnectState getState()
Gets the value of the property state.- Specified by:
getStatein interfaceGluonObservable- Property description:
- Returns:
- the current state
-
setState
public void setState(ConnectState state)
Sets the value of the property state.- Property description:
-
stateProperty
public ReadOnlyObjectProperty<ConnectState> stateProperty()
Description copied from interface:GluonObservableHolds the current state of this observable. This property can be used to listen for changes in the synchronization process.- Specified by:
statePropertyin interfaceGluonObservable- See Also:
getState(),setState(ConnectState)
-
getException
public Throwable getException()
Gets the value of the property exception.- Specified by:
getExceptionin interfaceGluonObservable- Property description:
- Returns:
- the exception, if one has occurred; otherwise null.
-
setException
public void setException(Throwable exception)
Sets the value of the property exception.- Property description:
-
exceptionProperty
public ReadOnlyObjectProperty<Throwable> exceptionProperty()
Description copied from interface:GluonObservableHolds the exception that was thrown when a synchronization operation failed.- Specified by:
exceptionPropertyin interfaceGluonObservable- See Also:
getException(),setException(Throwable)
-
setOnReady
public void setOnReady(EventHandler<ConnectStateEvent> value)
Description copied from interface:GluonObservableThe onReady event handler is called whenever the GluonObservable state transitions to the READY state.- Specified by:
setOnReadyin interfaceGluonObservable- Parameters:
value- the event handler, can be null to clear it
-
setOnRunning
public void setOnRunning(EventHandler<ConnectStateEvent> value)
Description copied from interface:GluonObservableThe onRunning event handler is called whenever the GluonObservable state transitions to the RUNNING state.- Specified by:
setOnRunningin interfaceGluonObservable- Parameters:
value- the event handler, can be null to clear it
-
setOnFailed
public void setOnFailed(EventHandler<ConnectStateEvent> value)
Description copied from interface:GluonObservableThe onFailed event handler is called whenever the GluonObservable state transitions to the FAILED state.- Specified by:
setOnFailedin interfaceGluonObservable- Parameters:
value- the event handler, can be null to clear it
-
setOnSucceeded
public void setOnSucceeded(EventHandler<ConnectStateEvent> value)
Description copied from interface:GluonObservableThe onSucceeded event handler is called whenever the GluonObservable state transitions to the SUCCEEDED state.- Specified by:
setOnSucceededin interfaceGluonObservable- Parameters:
value- the event handler, can be null to clear it
-
setOnCancelled
public void setOnCancelled(EventHandler<ConnectStateEvent> value)
Description copied from interface:GluonObservableThe onCancelled event handler is called whenever the GluonObservable state transitions to the CANCELLED state.- Specified by:
setOnCancelledin interfaceGluonObservable- Parameters:
value- the event handler, can be null to clear it
-
setOnRemoved
public void setOnRemoved(EventHandler<ConnectStateEvent> value)
Description copied from interface:GluonObservableThe onRemoved event handler is called whenever the GluonObservable state transitions to the REMOVED state.- Specified by:
setOnRemovedin interfaceGluonObservable- Parameters:
value- the event handler, can be null to clear it
-
buildEventDispatchChain
public EventDispatchChain buildEventDispatchChain(EventDispatchChain tail)
- Specified by:
buildEventDispatchChainin interfaceEventTarget
-
-