class TagEditHelper extends Object
Modifier and Type | Class and Description |
---|---|
(package private) class |
TagEditHelper.AbstractTagsDialog |
(package private) class |
TagEditHelper.AddTagsDialog |
class |
TagEditHelper.EditTagDialog |
Modifier and Type | Field and Description |
---|---|
private String |
changedKey |
static int |
DEFAULT_LRU_TAGS_NUMBER |
(package private) Comparator<AutoCompletionListItem> |
defaultACItemComparator |
private String |
lastAddKey |
private String |
lastAddValue |
static int |
MAX_LRU_TAGS_NUMBER |
private String |
objKey |
static BooleanProperty |
PROPERTY_FIX_TAG_LOCALE |
static IntegerProperty |
PROPERTY_RECENT_TAGS_NUMBER |
static BooleanProperty |
PROPERTY_REMEMBER_TAGS |
private Map<Tag,Void> |
recentTags |
(package private) Collection<OsmPrimitive> |
sel |
private DefaultTableModel |
tagData |
private Map<String,Map<String,Integer>> |
valueCount |
Constructor and Description |
---|
TagEditHelper(DefaultTableModel propertyData,
Map<String,Map<String,Integer>> valueCount) |
Modifier and Type | Method and Description |
---|---|
void |
addTag()
Open the add selection dialog and add a new key/value to the table (and
to the dataset, of course).
|
void |
editTag(int row,
boolean focusOnKey)
Edit the value in the tags table row
|
private static List<String> |
getAutocompletionKeys(String key)
For a given key k, return a list of keys which are used as keys for
auto-completing values to increase the search space.
|
String |
getChangedKey()
If during last editProperty call user changed the key name, this key will be returned
Elsewhere, returns null.
|
void |
loadTagsIfNeeded()
Load recently used tags from preferences if needed
|
void |
resetChangedKey() |
void |
saveTagsIfNeeded()
Store recently used tags in preferences if needed
|
private final DefaultTableModel tagData
Collection<OsmPrimitive> sel
private String changedKey
Comparator<AutoCompletionListItem> defaultACItemComparator
private String lastAddKey
private String lastAddValue
public static final int DEFAULT_LRU_TAGS_NUMBER
public static final int MAX_LRU_TAGS_NUMBER
private final Map<Tag,Void> recentTags
public static final BooleanProperty PROPERTY_FIX_TAG_LOCALE
public static final BooleanProperty PROPERTY_REMEMBER_TAGS
public static final IntegerProperty PROPERTY_RECENT_TAGS_NUMBER
TagEditHelper(DefaultTableModel propertyData, Map<String,Map<String,Integer>> valueCount)
public void addTag()
public void editTag(int row, boolean focusOnKey)
row
- The row of the table from which the value is edited.focusOnKey
- Determines if the initial focus should be set on key instead of valuepublic String getChangedKey()
public void resetChangedKey()
private static List<String> getAutocompletionKeys(String key)
key
- the key kpublic void loadTagsIfNeeded()
public void saveTagsIfNeeded()