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