Class MultiSelect
- 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.KeyedItem
-
- org.openstreetmap.josm.gui.tagging.presets.items.ComboMultiSelect
-
- org.openstreetmap.josm.gui.tagging.presets.items.MultiSelect
-
public class MultiSelect extends ComboMultiSelect
Multi-select list type.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.gui.tagging.presets.items.ComboMultiSelect
ComboMultiSelect.ComboMultiSelectListCellRenderer
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.gui.tagging.presets.items.KeyedItem
KeyedItem.MatchType, KeyedItem.Usage
-
-
Field Summary
Fields Modifier and Type Field Description protected JList<PresetListEntry>
list
The swing componentprotected DefaultListModel<PresetListEntry>
model
The model for the JListshort
rows
Number of rows to display (positive integer, optional).-
Fields inherited from class org.openstreetmap.josm.gui.tagging.presets.items.ComboMultiSelect
default_, delimiter, display_values, locale_display_values, locale_short_descriptions, originalValue, presetListEntries, seenValues, short_descriptions, usage, use_last_as_default, values, values_context, values_from, values_no_i18n, values_searchable, values_sort
-
Fields inherited from class org.openstreetmap.josm.gui.tagging.presets.items.KeyedItem
DIFFERENT, DIFFERENT_I18N, key, LAST_VALUES, match, PROP_FILL_DEFAULT
-
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 MultiSelect()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addEntry(PresetListEntry entry)
protected boolean
addToPanel(JPanel p, TaggingPresetItemGuiSupport support)
Called byTaggingPreset.createPanel(java.util.Collection<org.openstreetmap.josm.data.osm.OsmPrimitive>)
during tagging preset panel creation.protected PresetListEntry
getSelectedItem()
Returns the value selected in the combobox or a synthetic value if a multiselect.-
Methods inherited from class org.openstreetmap.josm.gui.tagging.presets.items.ComboMultiSelect
addCommands, addLabel, addListEntries, addListEntry, getDefaultMatch, getDisplayValues, getInitialValue, getValues, initListEntries, initListEntriesFromAttributes, isForceUseLastAsDefault, isUseLastAsDefault, setUse_last_as_default, splitEscaped
-
Methods inherited from class org.openstreetmap.josm.gui.tagging.presets.items.KeyedItem
determineBooleanUsage, determineTextUsage, getKeyTooltipText, getPopupMenu, isKeyRequired, matches, 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, parseInteger
-
-
-
-
Field Detail
-
rows
public short rows
Number of rows to display (positive integer, optional).
-
model
protected final DefaultListModel<PresetListEntry> model
The model for the JList
-
list
protected final JList<PresetListEntry> list
The swing component
-
-
Constructor Detail
-
MultiSelect
public MultiSelect()
-
-
Method Detail
-
addEntry
private void addEntry(PresetListEntry entry)
-
addToPanel
protected 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.
-
getSelectedItem
protected PresetListEntry getSelectedItem()
Description copied from class:ComboMultiSelect
Returns the value selected in the combobox or a synthetic value if a multiselect.- Specified by:
getSelectedItem
in classComboMultiSelect
- Returns:
- the value
-
-