public class MultiValueCellEditor extends javax.swing.AbstractCellEditor implements javax.swing.table.TableCellEditor
MultiValueCellEditor.NavigationListener
s registred with this editor.
You should register the parent table using this editor as MultiValueCellEditor.NavigationListener
.
KeyEvent.VK_ENTER
and KeyEvent.VK_TAB
trigger a MultiValueCellEditor.NavigationListener.gotoNextDecision()
.Modifier and Type | Class and Description |
---|---|
private static class |
MultiValueCellEditor.EditorCellRenderer
The cell renderer used in the edit combo box
|
static interface |
MultiValueCellEditor.NavigationListener
Defines the interface for an object implementing navigation between rows
|
Modifier and Type | Field and Description |
---|---|
private JosmComboBox<java.lang.Object> |
editor
the combo box used as editor
|
private javax.swing.DefaultComboBoxModel<java.lang.Object> |
editorModel |
private java.util.concurrent.CopyOnWriteArrayList<MultiValueCellEditor.NavigationListener> |
listeners |
Constructor and Description |
---|
MultiValueCellEditor()
Construct a new
MultiValueCellEditor |
Modifier and Type | Method and Description |
---|---|
void |
addNavigationListener(MultiValueCellEditor.NavigationListener listener)
Adds a navigation listener.
|
protected void |
fireGotoNextDecision() |
protected void |
fireGotoPreviousDecision() |
java.lang.Object |
getCellEditorValue() |
java.awt.Component |
getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column) |
protected void |
initEditor(MultiValueResolutionDecision decision)
Populate model with possible values for a decision, and select current choice.
|
void |
removeNavigationListener(MultiValueCellEditor.NavigationListener listener)
Removes a navigation listener.
|
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
private JosmComboBox<java.lang.Object> editor
private javax.swing.DefaultComboBoxModel<java.lang.Object> editorModel
private java.util.concurrent.CopyOnWriteArrayList<MultiValueCellEditor.NavigationListener> listeners
public MultiValueCellEditor()
MultiValueCellEditor
public void addNavigationListener(MultiValueCellEditor.NavigationListener listener)
listener
- navigation listener to addpublic void removeNavigationListener(MultiValueCellEditor.NavigationListener listener)
listener
- navigation listener to removeprotected void fireGotoNextDecision()
protected void fireGotoPreviousDecision()
protected void initEditor(MultiValueResolutionDecision decision)
decision
- The MultiValueResolutionDecision
to proceedpublic 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
public java.lang.Object getCellEditorValue()
getCellEditorValue
in interface javax.swing.CellEditor