cmu.survey.data.databits
Class DataBit<T>

java.lang.Object
  extended by cmu.survey.data.databits.DataBit<T>
All Implemented Interfaces:
java.lang.Cloneable, CloneablePublicly, CanAddPropertyChangeListener
Direct Known Subclasses:
DateDataBit, GenericNumberDataBit, StringDataBit

public abstract class DataBit<T>
extends java.lang.Object
implements CanAddPropertyChangeListener, CloneablePublicly


Field Summary
protected  T lastSavedValue
           
protected  java.beans.PropertyChangeSupport propertyChangeSupport
           
 
Constructor Summary
DataBit(java.lang.String dataFieldName)
           
DataBit(java.lang.String dataFieldName, T startValue)
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener changeListener)
           
 java.lang.Object clone()
           
abstract  DataBit<T> copy()
           
 T getLastSavedValue()
           
 java.lang.String getName()
           
 T getValue()
           
 boolean hasBeenModified()
           
 boolean isEditable()
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener changeListener)
           
 void setEditable(boolean b)
           
 void setHasBeenModified()
           
protected  void setHasBeenModified(boolean b)
           
 void setLastSavedObjectValue(java.lang.Object lastSaved)
           
 void setLastSavedValue(T lastSaved)
           
 void setValue(T newValue)
           
 DataBitUndoableEdit<T> setValueGetUndo(T newValue)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

propertyChangeSupport

protected java.beans.PropertyChangeSupport propertyChangeSupport

lastSavedValue

protected T lastSavedValue
Constructor Detail

DataBit

public DataBit(java.lang.String dataFieldName)

DataBit

public DataBit(java.lang.String dataFieldName,
               T startValue)
Method Detail

hasBeenModified

public boolean hasBeenModified()
Returns:

getName

public java.lang.String getName()
Returns:

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener changeListener)
Specified by:
addPropertyChangeListener in interface CanAddPropertyChangeListener

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener changeListener)
Specified by:
removePropertyChangeListener in interface CanAddPropertyChangeListener

setHasBeenModified

protected void setHasBeenModified(boolean b)
Parameters:
b -

setHasBeenModified

public void setHasBeenModified()

isEditable

public boolean isEditable()
Returns:

setEditable

public void setEditable(boolean b)
Parameters:
b -

getValue

public T getValue()

setValue

public void setValue(T newValue)

setLastSavedValue

public void setLastSavedValue(T lastSaved)

setLastSavedObjectValue

public void setLastSavedObjectValue(java.lang.Object lastSaved)

getLastSavedValue

public T getLastSavedValue()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setValueGetUndo

public DataBitUndoableEdit<T> setValueGetUndo(T newValue)

copy

public abstract DataBit<T> copy()

clone

public java.lang.Object clone()
Specified by:
clone in interface CloneablePublicly
Overrides:
clone in class java.lang.Object