Interface PropertyContainer
- All Known Implementing Classes:
AbstractPropertyContainer,SinglePropertyContainer
public interface PropertyContainer
Provides an interface for getting and setting
Propertys and
listening for changes to them.- Since:
- 3.2.0
- Author:
- Joel Uckelman
-
Method Summary
Modifier and TypeMethodDescription<T> voidaddPropertyListener(Property<T> prop, PropertyListener<? super T> listener) Adds a listener for a specificProperty.voidaddPropertyListener(PropertyListener<Object> listener) Adds a listener for all changes to this container.Returns thePropertys known to this container.Returns a list ofPropertyListeners listening to all changes to this container.<T> List<PropertyListener<? super T>> getPropertyListeners(Property<T> prop) Returns a list ofPropertyListeners listening to a givenProperty.<T> TGets the value of aProperty.booleanChecks whether there arePropertyListeners for all changes to this container.<T> booleanhasListeners(Property<T> prop) Checks whether there arePropertyListeners for a givenProperty.<T> voidremovePropertyListener(Property<T> prop, PropertyListener<? super T> listener) Removes a listener for a specificProperty.voidremovePropertyListener(PropertyListener<Object> listener) Removes a listener for all changes to this container.<T> voidSets the value of aProperty.
-
Method Details
-
getProperties
-
setValue
-
getValue
-
addPropertyListener
Adds a listener for all changes to this container.- Parameters:
listener- the listener to add
-
removePropertyListener
Removes a listener for all changes to this container.- Parameters:
listener- the listener to remove
-
hasListeners
boolean hasListeners()Checks whether there arePropertyListeners for all changes to this container.- Returns:
trueif there are listeners
-
getPropertyListeners
List<PropertyListener<Object>> getPropertyListeners()Returns a list ofPropertyListeners listening to all changes to this container.- Returns:
- a list of listeners
-
addPropertyListener
-
removePropertyListener
-
getPropertyListeners
Returns a list ofPropertyListeners listening to a givenProperty.- Parameters:
prop- thePropertylistened on- Returns:
- a list of listeners
-
hasListeners
Checks whether there arePropertyListeners for a givenProperty.- Returns:
trueif there are listeners for the given property
-