biz.chitec.quarterback.swing
Class NSCBMCellEditor
java.lang.Object
javax.swing.AbstractCellEditor
javax.swing.DefaultCellEditor
biz.chitec.quarterback.swing.NSCBMCellEditor
- All Implemented Interfaces:
- javax.swing.CellEditor, java.io.Serializable, javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor
- public class NSCBMCellEditor
- extends javax.swing.DefaultCellEditor
Editor for table cells which uses a JComboBox to select an entry from a NumberedStringComboBoxModel
- Version:
- $Id: 16b664fd82d7542af29f46f188989f880e7abd1e $
- Author:
- cantamen/Dirk Hillbrecht 2005
- See Also:
NSLMTableCellRenderer
,
NumberedStringComboBoxModel
,
Serialized Form
Nested classes inherited from class javax.swing.DefaultCellEditor |
javax.swing.DefaultCellEditor.EditorDelegate |
Fields inherited from class javax.swing.DefaultCellEditor |
clickCountToStart, delegate, editorComponent |
Fields inherited from class javax.swing.AbstractCellEditor |
changeEvent, listenerList |
Method Summary |
java.lang.Object |
getCellEditorValue()
Returns the numeric component of the selected NumberedString |
java.awt.Component |
getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column)
Implements the TableCellEditor interface. |
java.awt.Component |
getTreeCellEditorComponent(javax.swing.JTree tree,
java.lang.Object value,
boolean isSelected,
boolean expanded,
boolean leaf,
int row)
Implements the TreeCellEditor interface. |
void |
setNumberedStringComboBoxModel(NumberedStringComboBoxModel cbmx)
Set the NumberedStringComboBoxModel to use internally |
private void |
setSelectedIndex(java.lang.Object value)
Sets the selected index of the combo box from the given value |
Methods inherited from class javax.swing.DefaultCellEditor |
cancelCellEditing, getClickCountToStart, getComponent, isCellEditable, setClickCountToStart, shouldSelectCell, stopCellEditing |
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 |
cmb
private javax.swing.JComboBox cmb
cbm
private NumberedStringComboBoxModel cbm
NSCBMCellEditor
public NSCBMCellEditor(NumberedStringComboBoxModel cbmx)
- Create a table cell editor.
- Parameters:
cbmx
- NumberedStringComboBoxModel to work on
setNumberedStringComboBoxModel
public void setNumberedStringComboBoxModel(NumberedStringComboBoxModel cbmx)
- Set the NumberedStringComboBoxModel to use internally
- Parameters:
cbmx
- NumberedStringComboBoxModel to use internally
setSelectedIndex
private void setSelectedIndex(java.lang.Object value)
- Sets the selected index of the combo box from the given value
- Parameters:
value
- numeric component of the NumberedStrings
getTreeCellEditorComponent
public java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree,
java.lang.Object value,
boolean isSelected,
boolean expanded,
boolean leaf,
int row)
- Implements the
TreeCellEditor
interface.
getTableCellEditorComponent
public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column)
- Implements the
TableCellEditor
interface.
getCellEditorValue
public java.lang.Object getCellEditorValue()
- Returns the numeric component of the selected NumberedString