Package org.jdesktop.application
Class AbstractBean
java.lang.Object
org.jdesktop.application.AbstractBean
- Direct Known Subclasses:
ActionManager
,Application
,ApplicationContext
,LocalStorage
,ResourceManager
,Task.InputBlocker
,TaskMonitor
,TaskService
,View
An encapsulation of the PropertyChangeSupport methods based on
java.beans.PropertyChangeSupport. PropertyChangeListeners are fired
on the event dispatching thread.
Note: this class is only public because the so-called "fix" for javadoc bug 4780441 still fails to correctly document public methods inherited from a package private class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a PropertyChangeListener to the listener list.void
addPropertyChangeListener
(String propertyName, PropertyChangeListener listener) Add a PropertyChangeListener for a specific property.protected void
Fire an existing PropertyChangeEventprotected void
firePropertyChange
(String propertyName, Object oldValue, Object newValue) Called whenever the value of a bound property is set.An array of all of thePropertyChangeListeners
added so far.void
Remove a PropertyChangeListener from the listener list.void
removePropertyChangeListener
(String propertyName, PropertyChangeListener listener) Remove a PropertyChangeListener for a specific property.
-
Constructor Details
-
AbstractBean
public AbstractBean()
-
-
Method Details
-
addPropertyChangeListener
Add a PropertyChangeListener to the listener list. The listener is registered for all properties and itspropertyChange
method will run on the event dispatching thread.If
listener
is null, no exception is thrown and no action is taken.- Parameters:
listener
- the PropertyChangeListener to be added.- See Also:
-
removePropertyChangeListener
Remove a PropertyChangeListener from the listener list.If
listener
is null, no exception is thrown and no action is taken.- Parameters:
listener
- the PropertyChangeListener to be removed.- See Also:
-
addPropertyChangeListener
Add a PropertyChangeListener for a specific property. The listener will be invoked only when a call on firePropertyChange names that specific property. The same listener object may be added more than once. For each property, the listener will be invoked the number of times it was added for that property. IfpropertyName
orlistener
is null, no exception is thrown and no action is taken.- Parameters:
propertyName
- The name of the property to listen on.listener
- the PropertyChangeListener to be added- See Also:
-
removePropertyChangeListener
Remove a PropertyChangeListener for a specific property. Iflistener
was added more than once to the same event source for the specified property, it will be notified one less time after being removed. IfpropertyName
is null, no exception is thrown and no action is taken. Iflistener
is null, or was never added for the specified property, no exception is thrown and no action is taken.- Parameters:
propertyName
- The name of the property that was listened on.listener
- The PropertyChangeListener to be removed- See Also:
-
getPropertyChangeListeners
An array of all of thePropertyChangeListeners
added so far.- Returns:
- all of the
PropertyChangeListeners
added so far. - See Also:
-
firePropertyChange
Called whenever the value of a bound property is set.If oldValue is not equal to newValue, invoke the
propertyChange
method on all of thePropertyChangeListeners
added so far, on the event dispatching thread.- See Also:
-
firePropertyChange
Fire an existing PropertyChangeEventIf the event's oldValue property is not equal to newValue, invoke the
propertyChange
method on all of thePropertyChangeListeners
added so far, on the event dispatching thread.- See Also:
-