public class TagCellEditor extends AbstractCellEditor implements TableCellEditor
Modifier and Type | Field and Description |
---|---|
protected AutoCompletionManager |
autocomplete
the cache of auto completion items derived from the current JOSM data set
|
protected AutoCompletionList |
autoCompletionList
user input is matched against this list of auto completion items
|
protected TagModel |
currentTag |
protected AutoCompletingTextField |
editor |
changeEvent, listenerList
Constructor and Description |
---|
TagCellEditor(int maxCharacters)
constructor
|
Modifier and Type | Method and Description |
---|---|
void |
autoCompletionItemSelected(String item) |
AutoCompletionList |
getAutoCompletionList()
replies the
AutoCompletionList this table cell editor synchronizes with |
Object |
getCellEditorValue() |
AutoCompletingTextField |
getEditor() |
Component |
getTableCellEditorComponent(JTable table,
Object value,
boolean isSelected,
int row,
int column)
replies the table cell editor
|
protected void |
initAutoCompletionListForKeys(TagEditorModel model,
TagModel currentTag)
initializes the auto completion list when the table cell editor starts
to edit the key of a tag.
|
protected void |
initAutoCompletionListForValues(String forKey)
initializes the auto completion list when the cell editor starts to edit
a tag value.
|
void |
setAutoCompletionList(AutoCompletionList autoCompletionList)
sets the
AutoCompletionList this table cell editor synchronizes with |
void |
setAutoCompletionManager(AutoCompletionManager autocomplete) |
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addCellEditorListener, cancelCellEditing, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
protected AutoCompletingTextField editor
protected transient TagModel currentTag
protected transient AutoCompletionManager autocomplete
protected AutoCompletionList autoCompletionList
public TagCellEditor(int maxCharacters)
maxCharacters
- maximum number of characters allowed, 0 for unlimitedprotected void initAutoCompletionListForKeys(TagEditorModel model, TagModel currentTag)
model
- the tag editor modelcurrentTag
- the current tagprotected void initAutoCompletionListForValues(String forKey)
forKey
- the keypublic Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
getTableCellEditorComponent
in interface TableCellEditor
public Object getCellEditorValue()
getCellEditorValue
in interface CellEditor
public AutoCompletionList getAutoCompletionList()
AutoCompletionList
this table cell editor synchronizes withpublic void setAutoCompletionList(AutoCompletionList autoCompletionList)
AutoCompletionList
this table cell editor synchronizes withautoCompletionList
- the auto completion listpublic void setAutoCompletionManager(AutoCompletionManager autocomplete)
public void autoCompletionItemSelected(String item)
public AutoCompletingTextField getEditor()