com.antelmann.util.table
Class FormDialogCellEditor<T>
java.lang.Object
javax.swing.AbstractCellEditor
javax.swing.DefaultCellEditor
com.antelmann.util.table.AbstractDialogCellEditor<T>
com.antelmann.util.table.FormDialogCellEditor<T>
- All Implemented Interfaces:
- ValueRetriever<T>, ValueSetter<T>, Serializable, CellEditor, TableCellEditor, TreeCellEditor
public class FormDialogCellEditor<T>
- extends AbstractDialogCellEditor<T>
uses a FormDialog instead of a JOptionPane to support more complex editing
- Since:
- 23.07.2008, 13:20:06
- Author:
- Holger Antelmann
- See Also:
FormDialog,
Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FormDialogCellEditor
public FormDialogCellEditor(JComponent component,
FormValidator<T> validator,
ValueSetter<T> setter)
- constructs the instance
- Parameters:
component - the component that contains the editable elements that can be handled by the validatorvalidator - responsible for validating and committing the componentsetter - responsible for setting the value from the cell before editing starts
(used for implementing the interface); if the class needed access to more information
(like the current row), the easiest way is to subclass this and override the setRelevantValue(Object)
method to handle it.
showDialog
protected int showDialog(JComponent parent)
- returns
FormDialog.OK if the dialog was confirmed with ok
- Overrides:
showDialog in class AbstractDialogCellEditor<T>
- See Also:
JOptionPane.showConfirmDialog(Component, Object)
getRelevantValue
public T getRelevantValue()
- Description copied from interface:
ValueRetriever
- returns the relevant value for this instance at the time of calling
setRelevantValue
public void setRelevantValue(T value)
throws Exception
- Description copied from interface:
ValueSetter
- sets the relevant value for this instance with the given value
- Throws:
Exception
(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads