public class IntegerEditor
extends javax.swing.DefaultCellEditor
Modifier and Type | Field and Description |
---|---|
private boolean |
DEBUG |
(package private) javax.swing.JFormattedTextField |
ftf |
(package private) java.text.NumberFormat |
integerFormat |
private java.lang.Integer |
maximum |
private java.lang.Integer |
minimum |
private static long |
serialVersionUID |
Constructor and Description |
---|
IntegerEditor(int min,
int max)
TODO
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getCellEditorValue()
Override to ensure that the value remains an Integer.
|
java.awt.Component |
getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column)
Override to invoke setValue on the formatted text field.
|
boolean |
stopCellEditing()
Override to check whether the edit is valid, setting the value if it is and complaining if it isn't.
|
protected boolean |
userSaysRevert()
Lets the user know that the text they entered is bad.
|
cancelCellEditing, getClickCountToStart, getComponent, getTreeCellEditorComponent, isCellEditable, setClickCountToStart, shouldSelectCell
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener
private static final long serialVersionUID
javax.swing.JFormattedTextField ftf
java.text.NumberFormat integerFormat
private final java.lang.Integer minimum
private final java.lang.Integer maximum
private final boolean DEBUG
public IntegerEditor(int min, int max)
min
- max
- public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
getTableCellEditorComponent
in interface javax.swing.table.TableCellEditor
getTableCellEditorComponent
in class javax.swing.DefaultCellEditor
public java.lang.Object getCellEditorValue()
getCellEditorValue
in interface javax.swing.CellEditor
getCellEditorValue
in class javax.swing.DefaultCellEditor
public boolean stopCellEditing()
stopCellEditing
in interface javax.swing.CellEditor
stopCellEditing
in class javax.swing.DefaultCellEditor
protected boolean userSaysRevert()