Griffon 1.2.0

griffon.core
[Java] Interface Vetoable

griffon.core.Observable
  griffon.core.Vetoable
All Superinterfaces:
Observable

public interface Vetoable
extends Observable

Describes objects that provide bound and vetoable properties as specified in the Java Bean Specification.

Authors:
Andres Almiray
Since:
1.2.0


Method Summary
void addVetoableChangeListener(VetoableChangeListener listener)

Add a VetoableListener to the listener list.

void addVetoableChangeListener(String propertyName, VetoableChangeListener listener)

Add a VetoableChangeListener for a specific property.

VetoableChangeListener[] getVetoableChangeListeners()

Returns the list of VetoableChangeListeners.

VetoableChangeListener[] getVetoableChangeListeners(String propertyName)

Returns an array of all the listeners which have been associated with the named property.

void removeVetoableChangeListener(VetoableChangeListener listener)

Remove a VetoableChangeListener from the listener list.

void removeVetoableChangeListener(String propertyName, VetoableChangeListener listener)

Remove a VetoableChangeListener for a specific property.

 
Methods inherited from interface Observable
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
 

Method Detail

addVetoableChangeListener

public void addVetoableChangeListener(VetoableChangeListener listener)
Add a VetoableListener to the listener list. The listener is registered for all properties. The same listener object may be added more than once, and will be called as many times as it is added. If listener is null, no exception is thrown and no action is taken.
Parameters:
listener - The VetoableChangeListener to be added


addVetoableChangeListener

public void addVetoableChangeListener(String propertyName, VetoableChangeListener listener)
Add a VetoableChangeListener for a specific property. The listener will be invoked only when a call on fireVetoableChange 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. If propertyName or listener is null, no exception is thrown and no action is taken.
Parameters:
propertyName - The name of the property to listen on.
listener - The VetoableChangeListener to be added


getVetoableChangeListeners

public VetoableChangeListener[] getVetoableChangeListeners()
Returns the list of VetoableChangeListeners. If named vetoable change listeners were added, then VetoableChangeListenerProxy wrappers will returned

Returns:
List of VetoableChangeListeners and VetoableChangeListenerProxys if named property change listeners were added.


getVetoableChangeListeners

public VetoableChangeListener[] getVetoableChangeListeners(String propertyName)
Returns an array of all the listeners which have been associated with the named property.
Parameters:
propertyName - The name of the property being listened to
Returns:
all the VetoableChangeListeners associated with the named property. If no such listeners have been added, or if propertyName is null, an empty array is returned.


removeVetoableChangeListener

public void removeVetoableChangeListener(VetoableChangeListener listener)
Remove a VetoableChangeListener from the listener list. This removes a VetoableChangeListener that was registered for all properties. If listener was added more than once to the same event source, it will be notified one less time after being removed. If listener is null, or was never added, no exception is thrown and no action is taken.
Parameters:
listener - The VetoableChangeListener to be removed


removeVetoableChangeListener

public void removeVetoableChangeListener(String propertyName, VetoableChangeListener listener)
Remove a VetoableChangeListener for a specific property. If listener was added more than once to the same event source for the specified property, it will be notified one less time after being removed. If propertyName is null, no exception is thrown and no action is taken. If listener 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 VetoableChangeListener to be removed


 

Groovy Documentation