Class BasicPropertyChangeSource
java.lang.Object
uno.anahata.asi.agi.event.BasicPropertyChangeSource
- All Implemented Interfaces:
PropertyChangeSource, Rebindable
- Direct Known Subclasses:
AbstractAiProvider, AbstractAsiContainer, AbstractMessage, AbstractPart, AbstractTool, AbstractToolResponse, Agi, AgiConfig, AsiContainerPreferences, BasicContextProvider, ContextManager, ContextWindowGarbageCollector, RequestConfig, Resource, ResourceManager, StatusManager, SwingTaskManager, TextViewportSettings, ToolManager
public abstract class BasicPropertyChangeSource
extends Object
implements PropertyChangeSource, Rebindable
An abstract base class providing a standard implementation of
PropertyChangeSource.
This reduces boilerplate for domain objects that need to support reactive UI updates.
The PropertyChangeSupport field is marked as transient to prevent
the serialization of UI listeners, which are typically not serializable and
should not be persisted between sessions.
- Author:
- anahata
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PropertyChangeSupportSupport for firing property change events. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a property change listener.voidaddPropertyChangeListener(String propertyName, PropertyChangeListener listener) Adds a property change listener for a specific property.voidrebind()Re-initializes the transientPropertyChangeSupportafter deserialization.voidRemoves a property change listener.voidremovePropertyChangeListener(String propertyName, PropertyChangeListener listener) Removes a property change listener for a specific property.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PropertyChangeSource
getPropertyChangeSupportModifier and TypeMethodDescriptionGets the PropertyChangeSupport instance for this object.
-
Field Details
-
propertyChangeSupport
Support for firing property change events. Marked transient to avoid serializing listeners.
-
-
Constructor Details
-
BasicPropertyChangeSource
public BasicPropertyChangeSource()
-
-
Method Details
-
rebind
public void rebind()Re-initializes the transientPropertyChangeSupportafter deserialization.- Specified by:
rebindin interfaceRebindable
-
addPropertyChangeListener
Adds a property change listener.- Parameters:
listener- The listener to add.
-
removePropertyChangeListener
Removes a property change listener.- Parameters:
listener- The listener to remove.
-
addPropertyChangeListener
Adds a property change listener for a specific property.- Parameters:
propertyName- The name of the property to listen to.listener- The listener to add.
-
removePropertyChangeListener
Removes a property change listener for a specific property.- Parameters:
propertyName- The name of the property.listener- The listener to remove.
-

