org.openstreetmap.josm.gui.conflict.tags
Class MultiValueCellEditor
java.lang.Object
javax.swing.AbstractCellEditor
org.openstreetmap.josm.gui.conflict.tags.MultiValueCellEditor
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.CellEditor, javax.swing.table.TableCellEditor
public class MultiValueCellEditor
- extends javax.swing.AbstractCellEditor
- implements javax.swing.table.TableCellEditor
This is a table cell editor for selecting a possible tag value from a list of
proposed tag values. The editor also allows to select all proposed valued or
to remove the tag.
The editor responds intercepts some keys and interprets them as navigation keys. It
forwards navigation events to 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()
.
- See Also:
- Serialized Form
Fields inherited from class javax.swing.AbstractCellEditor |
changeEvent, listenerList |
Methods inherited from class javax.swing.AbstractCellEditor |
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing |
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, cancelCellEditing, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing |
editor
private JosmComboBox editor
- the combo box used as editor
editorModel
private javax.swing.DefaultComboBoxModel editorModel
listeners
private java.util.concurrent.CopyOnWriteArrayList<MultiValueCellEditor.NavigationListener> listeners
MultiValueCellEditor
public MultiValueCellEditor()
addNavigationListeners
public void addNavigationListeners(MultiValueCellEditor.NavigationListener listener)
removeavigationListeners
public void removeavigationListeners(MultiValueCellEditor.NavigationListener listener)
fireGotoNextDecision
protected void fireGotoNextDecision()
fireGotoPreviousDecision
protected void fireGotoPreviousDecision()
initEditor
protected void initEditor(MultiValueResolutionDecision decision)
getTableCellEditorComponent
public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column)
- Specified by:
getTableCellEditorComponent
in interface javax.swing.table.TableCellEditor
getCellEditorValue
public java.lang.Object getCellEditorValue()
- Specified by:
getCellEditorValue
in interface javax.swing.CellEditor
JOSM