public class AbstractVetoable extends AbstractObservable implements Vetoable
Modifier and Type | Field and Description |
---|---|
protected VetoableChangeSupport |
vcs |
pcs
Constructor and Description |
---|
AbstractVetoable() |
Modifier and Type | Method and Description |
---|---|
void |
addVetoableChangeListener(String propertyName,
VetoableChangeListener listener)
Add a VetoableChangeListener for a specific property.
|
void |
addVetoableChangeListener(VetoableChangeListener listener)
Add a VetoableListener to the listener list.
|
protected void |
fireVetoableChange(PropertyChangeEvent event) |
protected void |
fireVetoableChange(String propertyName,
Object oldValue,
Object newValue) |
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(String propertyName,
VetoableChangeListener listener)
Remove a VetoableChangeListener for a specific property.
|
void |
removeVetoableChangeListener(VetoableChangeListener listener)
Remove a VetoableChangeListener from the listener list.
|
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
protected final VetoableChangeSupport vcs
public void addVetoableChangeListener(@Nullable VetoableChangeListener listener)
Vetoable
listener
is null, no exception is thrown and no action
is taken.addVetoableChangeListener
in interface Vetoable
listener
- The VetoableChangeListener to be addedpublic void removeVetoableChangeListener(@Nullable VetoableChangeListener listener)
Vetoable
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.removeVetoableChangeListener
in interface Vetoable
listener
- The VetoableChangeListener to be removed@Nonnull public VetoableChangeListener[] getVetoableChangeListeners()
Vetoable
getVetoableChangeListeners
in interface Vetoable
public void addVetoableChangeListener(@Nullable String propertyName, @Nullable VetoableChangeListener listener)
Vetoable
propertyName
or listener
is null, no
exception is thrown and no action is taken.addVetoableChangeListener
in interface Vetoable
propertyName
- The name of the property to listen on.listener
- The VetoableChangeListener to be addedpublic void removeVetoableChangeListener(@Nullable String propertyName, @Nullable VetoableChangeListener listener)
Vetoable
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.removeVetoableChangeListener
in interface Vetoable
propertyName
- The name of the property that was listened on.listener
- The VetoableChangeListener to be removed@Nonnull public VetoableChangeListener[] getVetoableChangeListeners(@Nullable String propertyName)
Vetoable
getVetoableChangeListeners
in interface Vetoable
propertyName
- The name of the property being listened toVetoableChangeListeners
associated with
the named property. If no such listeners have been added,
or if propertyName
is null, an empty array is
returned.protected void fireVetoableChange(@Nonnull PropertyChangeEvent event) throws PropertyVetoException
PropertyVetoException
protected void fireVetoableChange(@Nonnull String propertyName, @Nullable Object oldValue, @Nullable Object newValue) throws PropertyVetoException
PropertyVetoException