PropertyChangeSupport
class
and the VetoableChangeSupport
class.
PropertyChangeSupport.PropertyChangeListenerMap
, VetoableChangeSupport.VetoableChangeListenerMap
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
public final synchronized void | |
public abstract L | |
public final synchronized L[] | |
public final Set | |
public final synchronized L[] | |
public final L[] | Returns: an array of listeners for the named propertythe name of the property name)Returns listeners that have been associated with the named property. |
public final synchronized boolean | Returns: true if at least one listener exists or
false otherwisethe name of the property name)Indicates whether the map contains at least one listener to be notified. |
protected abstract L[] | Returns: an array with specified lengththe array length length)Creates an array of listeners. |
protected abstract L | |
public final synchronized void | |
public final void |
map | back to summary |
---|---|
private Map<String, L[]> map |
ChangeListenerMap | back to summary |
---|---|
pack-priv ChangeListenerMap() |
add | back to summary |
---|---|
public final synchronized void add(String name, L listener) Adds a listener to the list of listeners for the specified property. This listener is called as many times as it was added.
|
extract | back to summary |
---|---|
public abstract L extract(L listener) Extracts a real listener from the proxy listener. It is necessary because default proxy class is not serializable.
|
get | back to summary |
---|---|
public final synchronized L[] get(String name) Returns the list of listeners for the specified property.
|
getEntries | back to summary |
---|---|
public final Set Returns a set of entries from the map. Each entry is a pair consisted of the property name and the corresponding list of listeners. |
getListeners | back to summary |
---|---|
public final synchronized L[] getListeners() Returns all listeners in the map.
|
getListeners | back to summary |
---|---|
public final L[] getListeners(String name) Returns listeners that have been associated with the named property.
|
hasListeners | back to summary |
---|---|
public final synchronized boolean hasListeners(String name) Indicates whether the map contains at least one listener to be notified.
|
newArray | back to summary |
---|---|
protected abstract L[] newArray(int length) Creates an array of listeners.
This method can be optimized by using
the same instance of the empty array
when
|
newProxy | back to summary |
---|---|
protected abstract L newProxy(String name, L listener) Creates a proxy listener for the specified property.
|
remove | back to summary |
---|---|
public final synchronized void remove(String name, L listener) Removes a listener from the list of listeners for the specified property. If the listener was added more than once to the same event source, this listener will be notified one less time after being removed.
|
set | back to summary |
---|---|
public final void set(String name, L[] listeners) Sets new list of listeners for the specified property.
|