public class DecimalCellEditor extends DefaultCellEditor
DecimalCellEditor which is able to validate the entered value.
If the value is not valid the cell is marked with a red border and the value is rejected.
The cell value is right aligned.DefaultCellEditor.EditorDelegateclickCountToStart, delegate, editorComponentchangeEvent, listenerList| Constructor and Description |
|---|
DecimalCellEditor()
Creates a new editor.
|
DecimalCellEditor(double minValue,
double maxValue)
Creates a new editor.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getCellEditorValue() |
Component |
getTableCellEditorComponent(JTable table,
Object value,
boolean isSelected,
int row,
int column) |
boolean |
stopCellEditing() |
protected boolean |
validateValue(double value) |
cancelCellEditing, getClickCountToStart, getComponent, getTreeCellEditorComponent, isCellEditable, setClickCountToStart, shouldSelectCelladdCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddCellEditorListener, removeCellEditorListenerpublic DecimalCellEditor()
Double.MIN_VALUE and Double.MAX_VALUEpublic DecimalCellEditor(double minValue,
double maxValue)
minValue and maxValueminValue - the minimum value of the valid rangemaxValue - the maximum value of the valid rangepublic Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
getTableCellEditorComponent in interface TableCellEditorgetTableCellEditorComponent in class DefaultCellEditorpublic boolean stopCellEditing()
stopCellEditing in interface CellEditorstopCellEditing in class DefaultCellEditorprotected boolean validateValue(double value)
public Object getCellEditorValue()
getCellEditorValue in interface CellEditorgetCellEditorValue in class DefaultCellEditorCopyright © 2014–2015 European Space Agency (ESA). All rights reserved.