|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
SupportsPropertyChange is an interface for objects
that can add PropertyChangeListener objects, can fire
PropertyChangeEvent events directly to those listeners,
and can forward internal PropertyChangeEvent events to
those listeners as well.
Many of the methods in this interface are identical to methods found in one or more of the following Java classes:
- Component
- JComponent
- PropertyChangeSupport
- SwingPropertyChangeSupport
The documentation below will indicate which of these classes has the particular method.
| Method Summary | |
void |
addForwardingListener(Object object)
Add the forwarding listener as a property change listener for the given object if the object supports property change. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list for a
specific property. |
void |
addPropertyChangeListeners(PropertyChangeListener[] listeners)
Add all items in the given PropertyChangeListener array
to the listener list. |
void |
addPropertyChangeListeners(String propertyName,
PropertyChangeListener[] listeners)
Add all items in the given PropertyChangeListener array
to the listener list for a specific property. |
void |
firePropertyChange(PropertyChangeEvent evt)
Fire an existing PropertyChangeEvent to any registered
listeners. |
void |
firePropertyChange(String propertyName,
boolean oldValue,
boolean newValue)
Report a bound property update to any registered listeners. |
void |
firePropertyChange(String propertyName,
byte oldValue,
byte newValue)
Report a bound property update to any registered listeners. |
void |
firePropertyChange(String propertyName,
char oldValue,
char newValue)
Report a bound property update to any registered listeners. |
void |
firePropertyChange(String propertyName,
double oldValue,
double newValue)
Report a bound property update to any registered listeners. |
void |
firePropertyChange(String propertyName,
float oldValue,
float newValue)
Report a bound property update to any registered listeners. |
void |
firePropertyChange(String propertyName,
int oldValue,
int newValue)
Report a bound property update to any registered listeners. |
void |
firePropertyChange(String propertyName,
long oldValue,
long newValue)
Report a bound property update to any registered listeners. |
void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
Report a bound property update to any registered listeners. |
void |
firePropertyChange(String propertyName,
short oldValue,
short newValue)
Report a bound property update to any registered listeners. |
PropertyChangeForwardingListener |
getForwardingListener()
Returns the PropertyChangeForwardingListener that
will forward the property change events it receives to this object. |
PropertyChangeListener[] |
getPropertyChangeListeners()
Returns an array of all listeners that were added to this object. |
PropertyChangeListener[] |
getPropertyChangeListeners(String propertyName)
Returns an array of all listeners that were added to this object and associated with the named property. |
boolean |
hasListeners(String propertyName)
Check if there are any listeners for a specific property. |
void |
removeAndAddForwardingListener(Object oldobject,
Object newobject)
Remove the forwarding listener as a property change listener for the old object if the old object supports property change and add the forwarding listener as a property change listener for the new object if the new object supports property change. |
void |
removeForwardingListener(Object object)
Remove the forwarding listener as a property change listener for the given object if the object supports property change. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property. |
| Method Detail |
public void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.
The listener is registered for all properties.
This method is found in:
- Component
- JComponent
- PropertyChangeSupport
- SwingPropertyChangeSupport
listener - the PropertyChangeListener to be added
public void addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list for a
specific property. The listener will be invoked only when a call on
firePropertyChange names that specific property.
This method is found in:
- Component
- JComponent
- PropertyChangeSupport
- SwingPropertyChangeSupport
propertyName - the name of the property to listen onlistener - the PropertyChangeListener to be addedpublic void addPropertyChangeListeners(PropertyChangeListener[] listeners)
Add all items in the given PropertyChangeListener array
to the listener list. These items are registered for all properties.
listeners - the PropertyChangeListener array to be added
public void addPropertyChangeListeners(String propertyName,
PropertyChangeListener[] listeners)
Add all items in the given PropertyChangeListener array
to the listener list for a specific property. These items will be invoked
only when a call on firePropertyChange names that specific
property.
listeners - the PropertyChangeListener array to be addedpublic void removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list.
This removes a PropertyChangeListener that was registered
for all properties.
This method is found in:
- Component
- JComponent
- PropertyChangeSupport
- SwingPropertyChangeSupport
listener - the PropertyChangeListener to be removed
public void removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property.
This method is found in:
- Component
- JComponent
- PropertyChangeSupport
- SwingPropertyChangeSupport
propertyName - the name of the property that was listened onlistener - the PropertyChangeListener to be removedpublic PropertyChangeListener[] getPropertyChangeListeners()
Returns an array of all listeners that were added to this object.
This method is found in:
- Component
- JComponent
- PropertyChangeSupport
- SwingPropertyChangeSupport
public PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
Returns an array of all listeners that were added to this object and associated with the named property.
This method is found in:
- Component
- JComponent
- PropertyChangeSupport
- SwingPropertyChangeSupport
propertyName - the name of the property to seek
public boolean hasListeners(String propertyName)
Check if there are any listeners for a specific property.
This method is found in:
- PropertyChangeSupport
- SwingPropertyChangeSupport
propertyName - the name of the property to check
public void firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
Report a bound property update to any registered listeners. No event is fired if the old and new values are equal and non-null.
This method is found in:
Component as a protected methodJComponent as a protected methodPropertyChangeSupportSwingPropertyChangeSupport
propertyName - the programmatic name of the property that was changedoldValue - the old value of the propertynewValue - the new value of the property
public void firePropertyChange(String propertyName,
boolean oldValue,
boolean newValue)
Report a bound property update to any registered listeners. No event is fired if the old and new values are equal.
This is merely a convenience wrapper around the more general firePropertyChange method that takes Object values.
This method is found in:
Component as a protected methodJComponentPropertyChangeSupportSwingPropertyChangeSupport
propertyName - the programmatic name of the property that was changedoldValue - the old value of the propertynewValue - the new value of the property
public void firePropertyChange(String propertyName,
char oldValue,
char newValue)
Report a bound property update to any registered listeners. No event is fired if the old and new values are equal.
This is merely a convenience wrapper around the more general firePropertyChange method that takes Object values.
This method is found in:
- JComponent
propertyName - the programmatic name of the property that was changedoldValue - the old value of the propertynewValue - the new value of the property
public void firePropertyChange(String propertyName,
byte oldValue,
byte newValue)
Report a bound property update to any registered listeners. No event is fired if the old and new values are equal.
This is merely a convenience wrapper around the more general firePropertyChange method that takes Object values.
This method is found in:
- JComponent
propertyName - the programmatic name of the property that was changedoldValue - the old value of the propertynewValue - the new value of the property
public void firePropertyChange(String propertyName,
short oldValue,
short newValue)
Report a bound property update to any registered listeners. No event is fired if the old and new values are equal.
This is merely a convenience wrapper around the more general firePropertyChange method that takes Object values.
This method is found in:
- JComponent
propertyName - the programmatic name of the property that was changedoldValue - the old value of the propertynewValue - the new value of the property
public void firePropertyChange(String propertyName,
int oldValue,
int newValue)
Report a bound property update to any registered listeners. No event is fired if the old and new values are equal.
This is merely a convenience wrapper around the more general firePropertyChange method that takes Object values.
This method is found in:
Component as a protected methodJComponentPropertyChangeSupportSwingPropertyChangeSupport
propertyName - the programmatic name of the property that was changedoldValue - the old value of the propertynewValue - the new value of the property
public void firePropertyChange(String propertyName,
long oldValue,
long newValue)
Report a bound property update to any registered listeners. No event is fired if the old and new values are equal.
This is merely a convenience wrapper around the more general firePropertyChange method that takes Object values.
This method is found in:
- JComponent
propertyName - the programmatic name of the property that was changedoldValue - the old value of the propertynewValue - the new value of the property
public void firePropertyChange(String propertyName,
float oldValue,
float newValue)
Report a bound property update to any registered listeners. No event is fired if the old and new values are equal.
This is merely a convenience wrapper around the more general firePropertyChange method that takes Object values.
This method is found in:
- JComponent
propertyName - the programmatic name of the property that was changedoldValue - the old value of the propertynewValue - the new value of the property
public void firePropertyChange(String propertyName,
double oldValue,
double newValue)
Report a bound property update to any registered listeners. No event is fired if the old and new values are equal.
This is merely a convenience wrapper around the more general firePropertyChange method that takes Object values.
This method is found in:
- JComponent
propertyName - the programmatic name of the property that was changedoldValue - the old value of the propertynewValue - the new value of the propertypublic void firePropertyChange(PropertyChangeEvent evt)
Fire an existing PropertyChangeEvent to any registered
listeners. No event is fired if the given event's old and new values
are equal and non-null.
This method is found in:
- PropertyChangeSupport
- SwingPropertyChangeSupport
evt - the PropertyChangeEvent objectpublic PropertyChangeForwardingListener getForwardingListener()
Returns the PropertyChangeForwardingListener that
will forward the property change events it receives to this object.
public void addForwardingListener(Object object)
object - the object that should add the forwarding listenerpublic void removeForwardingListener(Object object)
object - the object that should remove the forwarding listener
public void removeAndAddForwardingListener(Object oldobject,
Object newobject)
oldobject - the old object that should remove the forwarding listenernewobject - the new object that should add the forwarding listener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||