net.sf.jga.swing
Class GenericCellEditor.FormattedDelegate

java.lang.Object
  extended by net.sf.jga.swing.GenericCellEditor.FormattedDelegate
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.ItemListener, java.io.Serializable, java.util.EventListener
Enclosing class:
GenericCellEditor<T>

protected class GenericCellEditor.FormattedDelegate
extends java.lang.Object

See Also:
Serialized Form

Constructor Summary
GenericCellEditor.FormattedDelegate(UnaryFunctor<T,java.lang.String> formatter, UnaryFunctor<java.lang.String,T> parser)
           
 
Method Summary
 java.lang.Object getCellEditorValue()
          Retrieves the value in the component.
 void setValue(java.lang.Object value)
          Sets the text in the editor component by formatting the given value.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenericCellEditor.FormattedDelegate

public GenericCellEditor.FormattedDelegate(UnaryFunctor<T,java.lang.String> formatter,
                                           UnaryFunctor<java.lang.String,T> parser)
Method Detail

setValue

public void setValue(java.lang.Object value)
Sets the text in the editor component by formatting the given value. Will use the default value if one is available when given a null, otherwise will use an empty string.


getCellEditorValue

public java.lang.Object getCellEditorValue()
Retrieves the value in the component. If the component contains an empty string (or one with only whitespace), or if an exception occurs, then returns the default value (which may be null).


toString

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


Copyright © 2002-2006 David A. Hall. All Rights Reserved.