Changeset 3797 in josm for trunk/src/org/openstreetmap/josm/gui/preferences/TaggingPresetPreference.java
- Timestamp:
- 2011-01-21T14:11:47+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/TaggingPresetPreference.java
r3796 r3797 28 28 import org.openstreetmap.josm.gui.ExtendedDialog; 29 29 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane.ValidationListener; 30 import org.openstreetmap.josm.gui.preferences.S tyleSourceEditor.StyleSourceInfo;30 import org.openstreetmap.josm.gui.preferences.SourceEditor.ExtendedSourceEntry; 31 31 import org.openstreetmap.josm.gui.tagging.TaggingPreset; 32 32 import org.openstreetmap.josm.gui.tagging.TaggingPresetMenu; … … 46 46 47 47 public static Collection<TaggingPreset> taggingPresets; 48 private S tyleSourceEditor sources;48 private SourceEditor sources; 49 49 private JCheckBox sortMenu; 50 50 51 51 private ValidationListener validationListener = new ValidationListener() { 52 52 public boolean validatePreferences() { 53 if (sources.hasActiveS tylesChanged()) {53 if (sources.hasActiveSourcesChanged()) { 54 54 List<Integer> sourcesToRemove = new ArrayList<Integer>(); 55 55 int i = -1; 56 56 SOURCES: 57 for (SourceEntry source: sources.getActiveS tyles()) {57 for (SourceEntry source: sources.getActiveSources()) { 58 58 i++; 59 59 boolean canLoad = false; … … 153 153 public void stateChanged(ChangeEvent e) { 154 154 if (gui.mapcontent.getSelectedComponent() == panel) { 155 sources.initiallyLoadAvailableS tyles();155 sources.initiallyLoadAvailableSources(); 156 156 } 157 157 } … … 161 161 } 162 162 163 class TaggingPresetSourceEditor extends S tyleSourceEditor {163 class TaggingPresetSourceEditor extends SourceEditor { 164 164 165 165 final private String iconpref = "taggingpreset.icon.sources"; … … 176 176 @Override 177 177 public boolean finish() { 178 List<SourceEntry> activeStyles = activeS tylesModel.getStyles();178 List<SourceEntry> activeStyles = activeSourcesModel.getSources(); 179 179 180 180 boolean changed = (new PresetPrefMigration()).put(activeStyles); … … 195 195 196 196 @Override 197 public Collection< StyleSourceInfo> getDefault() {197 public Collection<ExtendedSourceEntry> getDefault() { 198 198 return (new PresetPrefMigration()).getDefault(); 199 199 } … … 211 211 case ACTIVE_SOURCES: 212 212 return tr("Active presets:"); 213 case NEW_SOURCE_ENTRY_TOOLTIP: 214 return tr("Add a new preset by entering filename or URL"); 213 215 case NEW_SOURCE_ENTRY: 214 216 return tr("New preset entry:"); … … 287 289 } 288 290 289 public static class PresetPrefMigration extends S tyleSourceEditor.SourcePrefMigration {291 public static class PresetPrefMigration extends SourceEditor.SourcePrefMigration { 290 292 291 293 public PresetPrefMigration() { … … 296 298 297 299 @Override 298 public Collection< StyleSourceInfo> getDefault() {299 StyleSourceInfo i = new StyleSourceInfo("defaultpresets.xml", "resource://data/defaultpresets.xml");300 public Collection<ExtendedSourceEntry> getDefault() { 301 ExtendedSourceEntry i = new ExtendedSourceEntry("defaultpresets.xml", "resource://data/defaultpresets.xml"); 300 302 i.shortdescription = tr("Internal Preset"); 301 303 i.description = tr("The default preset for JOSM");
Note:
See TracChangeset
for help on using the changeset viewer.