The user is not allowed to invoke an action on a disabled object.
If the disabled object is a user interface component, then it should visualize that actions may not be invoked. For example by disabling buttons.
The object can be disabled by adding Workers to its "disabler"
set. Additionally the object can disable itself, when its internal
state does not permit the invocation of actions.
The object is enabled when its "disabler" set is empty and its internal state permits the invocation of actions.
- Author:
- Werner Randelshofer
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ReadOnlyBooleanPropertyIndicates whether or not this object is disabled. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddDisabler(Object disabler) Adds a disabler.javafx.beans.property.ReadOnlyBooleanPropertyIndicates whether or not this object is disabled.javafx.collections.ObservableSet<Object> The set of disablers.default booleanGets the value of thedisabledproperty.default voidremoveDisabler(Object disabler) Removes a disabler.
-
Property Details
-
disabled
javafx.beans.property.ReadOnlyBooleanProperty disabledPropertyIndicates whether or not this object is disabled.The object is disabled when its "disabler" set is not empty or its internal state does not permit the invocation of actions.
- See Also:
-
-
Field Details
-
DISABLED_PROPERTY
The name of the disabled property.- See Also:
-
-
Method Details
-
disabledProperty
javafx.beans.property.ReadOnlyBooleanProperty disabledProperty()Indicates whether or not this object is disabled.The object is disabled when its "disabler" set is not empty or its internal state does not permit the invocation of actions.
- Returns:
- the disabled property.
- See Also:
-
disablers
javafx.collections.ObservableSet<Object> disablers()The set of disablers.- Returns:
- The disablers.
-
isDisabled
default boolean isDisabled()Gets the value of thedisabledproperty.- Property description:
- Indicates whether or not this object is disabled.
The object is disabled when its "disabler" set is not empty or its internal state does not permit the invocation of actions.
- Returns:
- the value of the
disabledproperty - See Also:
-
addDisabler
Adds a disabler.- Parameters:
disabler- a new disabler
-
removeDisabler
Removes a disabler.- Parameters:
disabler- an object which does not disable anymore
-