public static class PortConfigurerDialog.ValidatingComboBoxCellEditor
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 |
---|
ValidatingComboBoxCellEditor(javax.swing.JComboBox comboBox)
Construct a validating combo box 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 ValidatingComboBoxCellEditor(javax.swing.JComboBox comboBox)
comboBox
- The combo box 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.