cmu.survey.data.databits
Class DataBit<T>
java.lang.Object
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
Constructor Summary |
DataBit(java.lang.String dataFieldName)
|
DataBit(java.lang.String dataFieldName,
T startValue)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
propertyChangeSupport
protected java.beans.PropertyChangeSupport propertyChangeSupport
lastSavedValue
protected T lastSavedValue
DataBit
public DataBit(java.lang.String dataFieldName)
DataBit
public DataBit(java.lang.String dataFieldName,
T startValue)
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