ucar.unidata.beans
Class NonVetoableProperty

java.lang.Object
  extended by ucar.unidata.beans.AbstractProperty
      extended by ucar.unidata.beans.NonVetoableProperty
All Implemented Interfaces:
Property
Direct Known Subclasses:
RealReadout.FormatProperty, RealReadout.NameProperty, RealReadout.NumericValueProperty, RealReadout.UnitProperty

public class NonVetoableProperty
extends AbstractProperty

Provides support for non-vetoable JavaBean properties.

Version:
$Id: NonVetoableProperty.java,v 1.5 2005/05/13 18:28:22 jeffmc Exp $
Author:
Steven R. Emmerson

Constructor Summary
NonVetoableProperty(Object sourceBean, String name)
          Constructs an instance.
 
Method Summary
 void addVetoableChangeListener(VetoableChangeListener listener)
          Doesn't add a VetoableChangeListener.
 boolean isVetoable()
          Indicates if changes to this property can be vetoed.
 void removeVetoableChangeListener(VetoableChangeListener listener)
          Doesn't remove a VetoableChangeListener.
 void setValue(Object newValue)
          Sets the property value.
 void setValueAndNotifyListeners(Object newValue)
          Sets the property value.
 
Methods inherited from class ucar.unidata.beans.AbstractProperty
addPropertyChangeListener, clearValue, getName, getSourceBean, getValue, isReporting, notifyListeners, removePropertyChangeListener, setCurrentValue, setReporting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NonVetoableProperty

public NonVetoableProperty(Object sourceBean,
                           String name)
Constructs an instance.

Parameters:
sourceBean - The source bean of the property.
name - The name of the property.
Method Detail

isVetoable

public boolean isVetoable()
Indicates if changes to this property can be vetoed.

Specified by:
isVetoable in interface Property
Specified by:
isVetoable in class AbstractProperty
Returns:
False; always.

setValueAndNotifyListeners

public void setValueAndNotifyListeners(Object newValue)
Sets the property value. Will notify any listeners if and only if isReporting() is true.

Specified by:
setValueAndNotifyListeners in interface Property
Specified by:
setValueAndNotifyListeners in class AbstractProperty
Parameters:
newValue - The new property value.

setValue

public void setValue(Object newValue)
Sets the property value.

Specified by:
setValue in interface Property
Specified by:
setValue in class AbstractProperty
Parameters:
newValue - The new property value.

addVetoableChangeListener

public void addVetoableChangeListener(VetoableChangeListener listener)
                               throws UnsupportedOperationException
Doesn't add a VetoableChangeListener.

Specified by:
addVetoableChangeListener in interface Property
Specified by:
addVetoableChangeListener in class AbstractProperty
Parameters:
listener - The VetoableChangeListener to add.
Throws:
UnsupportedOperationException - This operation is unsupported for this type of Property. Always thrown.

removeVetoableChangeListener

public void removeVetoableChangeListener(VetoableChangeListener listener)
Doesn't remove a VetoableChangeListener.

Specified by:
removeVetoableChangeListener in interface Property
Specified by:
removeVetoableChangeListener in class AbstractProperty
Parameters:
listener - The VetoableChangeListener to remove.