|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractCellEditor
javax.swing.DefaultCellEditor
ptolemy.actor.gui.PortConfigurerDialog.ValidatingJTextFieldCellEditor
public class PortConfigurerDialog.ValidatingJTextFieldCellEditor
A validating JTextField table cell editor for use with JTable. To determine if a selection is valid, this class uses the CellValidator class.
Based on IntegerEditor from http://java.sun.com/docs/books/tutorial/uiswing/components/example-1dot4/IntegerEditor.java
Red (eal) |
Red (eal) |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.DefaultCellEditor |
---|
javax.swing.DefaultCellEditor.EditorDelegate |
Field Summary | |
---|---|
private javax.swing.JFormattedTextField |
_jFormattedTextField
The JTextField. |
private java.lang.Object |
_oldValue
Old value of the JTextField. |
private boolean |
_userWantsToEdit
True if the user wants to edit after having an invalid selection. |
private PortConfigurerDialog.CellValidator |
_validator
Class that validates the cell. |
Fields inherited from class javax.swing.DefaultCellEditor |
---|
clickCountToStart, delegate, editorComponent |
Fields inherited from class javax.swing.AbstractCellEditor |
---|
changeEvent, listenerList |
Constructor Summary | |
---|---|
PortConfigurerDialog.ValidatingJTextFieldCellEditor()
Construct a validating JTextField JTable Cell editor. |
|
PortConfigurerDialog.ValidatingJTextFieldCellEditor(javax.swing.JFormattedTextField jFormattedTextField)
Construct a validating JTextField JTable Cell editor. |
Method Summary | |
---|---|
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. |
Methods inherited from class javax.swing.DefaultCellEditor |
---|
cancelCellEditing, getClickCountToStart, getComponent, getTreeCellEditorComponent, isCellEditable, setClickCountToStart, shouldSelectCell |
Methods inherited from class javax.swing.AbstractCellEditor |
---|
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.CellEditor |
---|
addCellEditorListener, removeCellEditorListener |
Methods inherited from interface javax.swing.CellEditor |
---|
addCellEditorListener, removeCellEditorListener |
Field Detail |
---|
private javax.swing.JFormattedTextField _jFormattedTextField
private java.lang.Object _oldValue
private boolean _userWantsToEdit
private PortConfigurerDialog.CellValidator _validator
Constructor Detail |
---|
public PortConfigurerDialog.ValidatingJTextFieldCellEditor()
public PortConfigurerDialog.ValidatingJTextFieldCellEditor(javax.swing.JFormattedTextField jFormattedTextField)
jFormattedTextField
- The JTextField that provides choices.Method Detail |
---|
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |