source: josm/trunk/src/org/openstreetmap/josm/data/preferences/sources/PresetPrefHelper.java@ 15211

Last change on this file since 15211 was 15211, checked in by Don-vip, 5 years ago

fix #13458 - display external resources icons in the preferences

  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.preferences.sources;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import java.util.Collection;
7import java.util.Collections;
8
9import org.openstreetmap.josm.tools.ImageProvider;
10
11/**
12 * Helper class for tagging presets preferences.
13 * @since 12649 (extracted from gui.preferences package)
14 */
15public class PresetPrefHelper extends SourcePrefHelper {
16
17 /**
18 * The unique instance.
19 */
20 public static final PresetPrefHelper INSTANCE = new PresetPrefHelper();
21
22 /**
23 * Constructs a new {@code PresetPrefHelper}.
24 */
25 public PresetPrefHelper() {
26 super("taggingpreset.entries", SourceType.TAGGING_PRESET);
27 }
28
29 @Override
30 public Collection<ExtendedSourceEntry> getDefault() {
31 ExtendedSourceEntry i = new ExtendedSourceEntry(type, "defaultpresets.xml", "resource://data/defaultpresets.xml");
32 i.title = tr("Internal Preset");
33 i.icon = new ImageProvider("logo").getResource();
34 i.description = tr("The default preset for JOSM");
35 return Collections.singletonList(i);
36 }
37}
Note: See TracBrowser for help on using the repository browser.