Class PresetLink
- java.lang.Object
-
- org.openstreetmap.josm.gui.tagging.presets.TaggingPresetItem
-
- org.openstreetmap.josm.gui.tagging.presets.items.TextItem
-
- org.openstreetmap.josm.gui.tagging.presets.items.PresetLink
-
public class PresetLink extends TextItem
Adds a link to another preset.- Since:
- 8863
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
PresetLink.TaggingPresetMouseAdapter
-
Field Summary
Fields Modifier and Type Field Description String
preset_name
The exact name of the preset to link to.-
Fields inherited from class org.openstreetmap.josm.gui.tagging.presets.items.TextItem
icon, icon_size, locale_text, text, text_context
-
Fields inherited from class org.openstreetmap.josm.gui.tagging.presets.TaggingPresetItem
DISPLAY_KEYS_AS_HINT
-
-
Constructor Summary
Constructors Constructor Description PresetLink()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCommands(List<Tag> changedTags)
Adds the new tags to apply to selected OSM primitives when the preset holding this item is applied.boolean
addToPanel(JPanel p, TaggingPresetItemGuiSupport support)
Called byTaggingPreset.createPanel(java.util.Collection<org.openstreetmap.josm.data.osm.OsmPrimitive>)
during tagging preset panel creation.JLabel
createLabel()
Creates a label to be inserted aboive this linkString
toString()
-
Methods inherited from class org.openstreetmap.josm.gui.tagging.presets.items.TextItem
addIcon, fieldsToString, getIcon, initializeLocaleText
-
Methods inherited from class org.openstreetmap.josm.gui.tagging.presets.TaggingPresetItem
fixPresetString, getAllForKeys, getLocaleText, getType, initAutoCompletionField, initAutoCompletionField, loadImageIcon, matches, matches, parseInteger
-
-
-
-
Field Detail
-
preset_name
public String preset_name
The exact name of the preset to link to. Required.
-
-
Constructor Detail
-
PresetLink
public PresetLink()
-
-
Method Detail
-
createLabel
public JLabel createLabel()
Creates a label to be inserted aboive this link- Returns:
- a label
-
addToPanel
public boolean addToPanel(JPanel p, TaggingPresetItemGuiSupport support)
Description copied from class:TaggingPresetItem
Called byTaggingPreset.createPanel(java.util.Collection<org.openstreetmap.josm.data.osm.OsmPrimitive>)
during tagging preset panel creation. All components defining this tagging preset item must be added to given panel.- Specified by:
addToPanel
in classTaggingPresetItem
- Parameters:
p
- The panel where components must be addedsupport
- supporting class for creating the GUI- Returns:
true
if this item adds semantic tagging elements,false
otherwise.
-
addCommands
public void addCommands(List<Tag> changedTags)
Description copied from class:TaggingPresetItem
Adds the new tags to apply to selected OSM primitives when the preset holding this item is applied.- Overrides:
addCommands
in classTextItem
- Parameters:
changedTags
- The list of changed tags to modify if needed
-
-