public abstract class KeyedItem extends TaggingPresetItem
Modifier and Type | Class and Description |
---|---|
protected static class |
KeyedItem.MatchType
Enum denoting how a match (see
TaggingPresetItem.matches(java.util.Map<java.lang.String, java.lang.String>) ) is performed. |
protected static class |
KeyedItem.Usage |
Modifier and Type | Field and Description |
---|---|
protected static String |
DIFFERENT
Translatation of "<different>".
|
String |
key |
protected static Map<String,String> |
LAST_VALUES
Last value of each key used in presets, used for prefilling corresponding fields
|
String |
match |
protected static BooleanProperty |
PROP_FILL_DEFAULT |
String |
text
The text to display
|
String |
text_context
The context used for translating
text |
Constructor and Description |
---|
KeyedItem() |
Modifier and Type | Method and Description |
---|---|
protected static KeyedItem.Usage |
determineBooleanUsage(Collection<OsmPrimitive> sel,
String key) |
protected static KeyedItem.Usage |
determineTextUsage(Collection<OsmPrimitive> sel,
String key) |
abstract KeyedItem.MatchType |
getDefaultMatch() |
abstract Collection<String> |
getValues() |
protected Boolean |
matches(Map<String,String> tags)
Tests whether the tags match this item.
|
String |
toString() |
addCommands, addToPanel, fixPresetString, getLocaleText, getType, initAutoCompletionField, initAutoCompletionField, loadImageIcon, parseInteger
protected static final String DIFFERENT
protected static final BooleanProperty PROP_FILL_DEFAULT
protected static final Map<String,String> LAST_VALUES
public String text_context
text
public KeyedItem()
protected static KeyedItem.Usage determineTextUsage(Collection<OsmPrimitive> sel, String key)
protected static KeyedItem.Usage determineBooleanUsage(Collection<OsmPrimitive> sel, String key)
public abstract KeyedItem.MatchType getDefaultMatch()
public abstract Collection<String> getValues()
protected Boolean matches(Map<String,String> tags)
TaggingPresetItem
matches
in class TaggingPresetItem
tags
- the tags of an OsmPrimitive
true
if matches (positive), null
if neutral, false
if mismatches (negative).