Class TaggingPresetNameTemplateList
- java.lang.Object
-
- org.openstreetmap.josm.gui.tagging.presets.TaggingPresetNameTemplateList
-
- All Implemented Interfaces:
TaggingPresetListener
public final class TaggingPresetNameTemplateList extends Object implements TaggingPresetListener
List of tagging presets with name templates, allows to find appropriate template based on existing primitive
-
-
Field Summary
Fields Modifier and Type Field Description private static TaggingPresetNameTemplateList
instance
private List<TaggingPreset>
presetsWithPattern
-
Constructor Summary
Constructors Modifier Constructor Description private
TaggingPresetNameTemplateList()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
buildPresetsWithPattern()
TaggingPreset
findPresetTemplate(IPrimitive primitive)
Finds and returns the first occurrence of preset with template name matching the given primitivestatic TaggingPresetNameTemplateList
getInstance()
Replies the unique instance.void
taggingPresetsModified()
Called after list of tagging presets has been modified.
-
-
-
Field Detail
-
instance
private static TaggingPresetNameTemplateList instance
-
presetsWithPattern
private final List<TaggingPreset> presetsWithPattern
-
-
Constructor Detail
-
TaggingPresetNameTemplateList
private TaggingPresetNameTemplateList()
-
-
Method Detail
-
getInstance
public static TaggingPresetNameTemplateList getInstance()
Replies the unique instance.- Returns:
- the unique instance
-
buildPresetsWithPattern
private void buildPresetsWithPattern()
-
findPresetTemplate
public TaggingPreset findPresetTemplate(IPrimitive primitive)
Finds and returns the first occurrence of preset with template name matching the given primitive- Parameters:
primitive
- The primitive to match- Returns:
- the first occurrence of preset with template name matching the primitive
-
taggingPresetsModified
public void taggingPresetsModified()
Description copied from interface:TaggingPresetListener
Called after list of tagging presets has been modified.- Specified by:
taggingPresetsModified
in interfaceTaggingPresetListener
-
-