Package org.esa.snap.ui
Class DecimalCellEditor
java.lang.Object
javax.swing.AbstractCellEditor
javax.swing.DefaultCellEditor
org.esa.snap.ui.DecimalCellEditor
- All Implemented Interfaces:
 Serializable,CellEditor,TableCellEditor,TreeCellEditor
A 
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.- See Also:
 
- 
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.DefaultCellEditor
DefaultCellEditor.EditorDelegate - 
Field Summary
Fields inherited from class javax.swing.DefaultCellEditor
clickCountToStart, delegate, editorComponentFields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList - 
Constructor Summary
ConstructorsConstructorDescriptionCreates a new editor.DecimalCellEditor(double minValue, double maxValue) Creates a new editor. - 
Method Summary
Modifier and TypeMethodDescriptiongetTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) booleanprotected booleanvalidateValue(double value) Methods inherited from class javax.swing.DefaultCellEditor
cancelCellEditing, getClickCountToStart, getComponent, getTreeCellEditorComponent, isCellEditable, setClickCountToStart, shouldSelectCellMethods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.swing.CellEditor
addCellEditorListener, removeCellEditorListener 
- 
Constructor Details
- 
DecimalCellEditor
public DecimalCellEditor()Creates a new editor. The bounds of the valid value range are set toDouble.MIN_VALUEandDouble.MAX_VALUE - 
DecimalCellEditor
public DecimalCellEditor(double minValue, double maxValue) Creates a new editor. The bounds of the valid value range are set to specifiedminValueandmaxValue- Parameters:
 minValue- the minimum value of the valid rangemaxValue- the maximum value of the valid range
 
 - 
 - 
Method Details
- 
getTableCellEditorComponent
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) - Specified by:
 getTableCellEditorComponentin interfaceTableCellEditor- Overrides:
 getTableCellEditorComponentin classDefaultCellEditor
 - 
stopCellEditing
public boolean stopCellEditing()- Specified by:
 stopCellEditingin interfaceCellEditor- Overrides:
 stopCellEditingin classDefaultCellEditor
 - 
validateValue
protected boolean validateValue(double value)  - 
getCellEditorValue
- Specified by:
 getCellEditorValuein interfaceCellEditor- Overrides:
 getCellEditorValuein classDefaultCellEditor
 
 -