- 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>
exception
Holds the exception that was thrown when a synchronization operation failed.ReadOnlyBooleanProperty
initialized
A boolean property that is true when the observable has been initialized successfully after its initial retrieval.ReadOnlyObjectProperty<ConnectState>
state
Holds 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 EventDispatchChain
buildEventDispatchChain(EventDispatchChain tail)
ReadOnlyObjectProperty<Throwable>
exceptionProperty()
Holds the exception that was thrown when a synchronization operation failed.Throwable
getException()
Gets the value of the property exception.ConnectState
getState()
Gets the value of the property state.ReadOnlyBooleanProperty
initializedProperty()
A boolean property that is true when the observable has been initialized successfully after its initial retrieval.boolean
isInitialized()
Gets the value of the property initialized.void
setException(Throwable exception)
Sets the value of the property exception.void
setOnCancelled(EventHandler<ConnectStateEvent> value)
The onCancelled event handler is called whenever the GluonObservable state transitions to the CANCELLED state.void
setOnFailed(EventHandler<ConnectStateEvent> value)
The onFailed event handler is called whenever the GluonObservable state transitions to the FAILED state.void
setOnReady(EventHandler<ConnectStateEvent> value)
The onReady event handler is called whenever the GluonObservable state transitions to the READY state.void
setOnRemoved(EventHandler<ConnectStateEvent> value)
The onRemoved event handler is called whenever the GluonObservable state transitions to the REMOVED state.void
setOnRunning(EventHandler<ConnectStateEvent> value)
The onRunning event handler is called whenever the GluonObservable state transitions to the RUNNING state.void
setOnSucceeded(EventHandler<ConnectStateEvent> value)
The onSucceeded event handler is called whenever the GluonObservable state transitions to the SUCCEEDED state.void
setState(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
getValue
-
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:
initializedProperty
in interfaceGluonObservable
- See Also:
isInitialized()
-
state
public ReadOnlyObjectProperty<ConnectState> stateProperty
- Specified by:
stateProperty
in interfaceGluonObservable
- See Also:
getState()
,setState(ConnectState)
-
exception
public ReadOnlyObjectProperty<Throwable> exceptionProperty
- Specified by:
exceptionProperty
in interfaceGluonObservable
- See Also:
getException()
,setException(Throwable)
-
-
Method Detail
-
isInitialized
public boolean isInitialized()
Gets the value of the property initialized.- Specified by:
isInitialized
in interfaceGluonObservable
- Property description:
- Returns:
- true when the observable is initialized; false otherwise.
-
initializedProperty
public ReadOnlyBooleanProperty initializedProperty()
Description copied from interface:GluonObservable
A boolean property that is true when the observable has been initialized successfully after its initial retrieval.- Specified by:
initializedProperty
in interfaceGluonObservable
- See Also:
isInitialized()
-
getState
public ConnectState getState()
Gets the value of the property state.- Specified by:
getState
in 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:GluonObservable
Holds the current state of this observable. This property can be used to listen for changes in the synchronization process.- Specified by:
stateProperty
in interfaceGluonObservable
- See Also:
getState()
,setState(ConnectState)
-
getException
public Throwable getException()
Gets the value of the property exception.- Specified by:
getException
in 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:GluonObservable
Holds the exception that was thrown when a synchronization operation failed.- Specified by:
exceptionProperty
in interfaceGluonObservable
- See Also:
getException()
,setException(Throwable)
-
setOnReady
public void setOnReady(EventHandler<ConnectStateEvent> value)
Description copied from interface:GluonObservable
The onReady event handler is called whenever the GluonObservable state transitions to the READY state.- Specified by:
setOnReady
in interfaceGluonObservable
- Parameters:
value
- the event handler, can be null to clear it
-
setOnRunning
public void setOnRunning(EventHandler<ConnectStateEvent> value)
Description copied from interface:GluonObservable
The onRunning event handler is called whenever the GluonObservable state transitions to the RUNNING state.- Specified by:
setOnRunning
in interfaceGluonObservable
- Parameters:
value
- the event handler, can be null to clear it
-
setOnFailed
public void setOnFailed(EventHandler<ConnectStateEvent> value)
Description copied from interface:GluonObservable
The onFailed event handler is called whenever the GluonObservable state transitions to the FAILED state.- Specified by:
setOnFailed
in interfaceGluonObservable
- Parameters:
value
- the event handler, can be null to clear it
-
setOnSucceeded
public void setOnSucceeded(EventHandler<ConnectStateEvent> value)
Description copied from interface:GluonObservable
The onSucceeded event handler is called whenever the GluonObservable state transitions to the SUCCEEDED state.- Specified by:
setOnSucceeded
in interfaceGluonObservable
- Parameters:
value
- the event handler, can be null to clear it
-
setOnCancelled
public void setOnCancelled(EventHandler<ConnectStateEvent> value)
Description copied from interface:GluonObservable
The onCancelled event handler is called whenever the GluonObservable state transitions to the CANCELLED state.- Specified by:
setOnCancelled
in interfaceGluonObservable
- Parameters:
value
- the event handler, can be null to clear it
-
setOnRemoved
public void setOnRemoved(EventHandler<ConnectStateEvent> value)
Description copied from interface:GluonObservable
The onRemoved event handler is called whenever the GluonObservable state transitions to the REMOVED state.- Specified by:
setOnRemoved
in interfaceGluonObservable
- Parameters:
value
- the event handler, can be null to clear it
-
buildEventDispatchChain
public EventDispatchChain buildEventDispatchChain(EventDispatchChain tail)
- Specified by:
buildEventDispatchChain
in interfaceEventTarget
-
-