public class TagCellEditor extends javax.swing.AbstractCellEditor implements javax.swing.table.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 |
Constructor and Description |
---|
TagCellEditor(int maxCharacters)
constructor
|
Modifier and Type | Method and Description |
---|---|
void |
autoCompletionItemSelected(java.lang.String item)
Selects an item from the auto completion list and fills this cell with the value
|
AutoCompletionList |
getAutoCompletionList()
replies the
AutoCompletionList this table cell editor synchronizes with |
java.lang.Object |
getCellEditorValue() |
AutoCompletingTextField |
getEditor()
Gets the editor for this cell
|
java.awt.Component |
getTableCellEditorComponent(javax.swing.JTable table,
java.lang.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(java.lang.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)
Sets the manager that helps with auto completion
|
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, 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(java.lang.String forKey)
forKey
- the keypublic 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
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)
autocomplete
- The AutoCompletionManager
public void autoCompletionItemSelected(java.lang.String item)
item
- The text that was selectedpublic AutoCompletingTextField getEditor()