public class PortConfigurerDialog.ValidatingJTextFieldCellEditor
extends javax.swing.DefaultCellEditor
Based on IntegerEditor from http://download.oracle.com/javase/tutorial/uiswing/examples/components/TableFTFEditDemoProject/src/components/IntegerEditor.java
Constructor and Description |
---|
ValidatingJTextFieldCellEditor()
Construct a validating JTextField JTable Cell editor.
|
ValidatingJTextFieldCellEditor(javax.swing.JFormattedTextField jFormattedTextField)
Construct a validating JTextField JTable Cell editor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getCellEditorValue()
Get the cell editor value.
|
java.awt.Component |
getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column) |
void |
setValidator(PortConfigurerDialog.CellValidator validator)
Set the validator.
|
boolean |
stopCellEditing()
Check the selection and determine whether we should stop editing.
|
protected boolean |
userSaysRevert(java.lang.String selectedItem)
Return true if the user wants to revert to the original value.
|
cancelCellEditing, getClickCountToStart, getComponent, getTreeCellEditorComponent, isCellEditable, setClickCountToStart, shouldSelectCell
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener
public ValidatingJTextFieldCellEditor()
public ValidatingJTextFieldCellEditor(javax.swing.JFormattedTextField jFormattedTextField)
jFormattedTextField
- The JTextField that provides choices.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 void setValidator(PortConfigurerDialog.CellValidator validator)
validator
- The validator.public boolean stopCellEditing()
stopCellEditing
in interface javax.swing.CellEditor
stopCellEditing
in class javax.swing.DefaultCellEditor
protected boolean userSaysRevert(java.lang.String selectedItem)
selectedItem
- The selected item.