public static class TaggingPresetItems.Label extends TaggingPresetItems.TaggingPresetTextItem
Modifier and Type | Field and Description |
---|---|
java.lang.String |
icon
The location of icon file to display (optional)
|
java.lang.String |
icon_size
The size of displayed icon.
|
locale_text, text, text_context
Constructor and Description |
---|
Label() |
Modifier and Type | Method and Description |
---|---|
static void |
addLabel(javax.swing.JPanel p,
javax.swing.Icon icon,
java.lang.String label)
Adds a new
JLabel to the given panel. |
boolean |
addToPanel(javax.swing.JPanel p,
java.util.Collection<OsmPrimitive> sel,
boolean presetInitiallyMatches)
Called by
TaggingPreset.createPanel(java.util.Collection<org.openstreetmap.josm.data.osm.OsmPrimitive>) during tagging preset panel creation. |
javax.swing.ImageIcon |
getIcon()
Returns the label icon, if any.
|
addCommands, fieldsToString, initializeLocaleText, toString
initAutoCompletionField, initAutoCompletionField, matches, requestFocusInWindow
public java.lang.String icon
public java.lang.String icon_size
public Label()
public boolean addToPanel(javax.swing.JPanel p, java.util.Collection<OsmPrimitive> sel, boolean presetInitiallyMatches)
TaggingPresetItem
TaggingPreset.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.addToPanel
in class TaggingPresetItem
p
- The panel where components must be addedsel
- The related selected OSM primitivespresetInitiallyMatches
- Whether this TaggingPreset
already matched before applying,
i.e. whether the map feature already existed on the primitive.true
if this item adds semantic tagging elements, false
otherwise.public static void addLabel(javax.swing.JPanel p, javax.swing.Icon icon, java.lang.String label)
JLabel
to the given panel.p
- The panelicon
- the icon (optional, can be null)label
- The text labelpublic javax.swing.ImageIcon getIcon()
null