Changeset 3797 in josm for trunk/src/org/openstreetmap/josm/gui/preferences/MapPaintPreference.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/MapPaintPreference.java
r3796 r3797 24 24 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 25 25 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles; 26 import org.openstreetmap.josm.gui.preferences.S tyleSourceEditor.StyleSourceInfo;26 import org.openstreetmap.josm.gui.preferences.SourceEditor.ExtendedSourceEntry; 27 27 import org.openstreetmap.josm.tools.GBC; 28 28 29 29 public class MapPaintPreference implements PreferenceSetting { 30 private S tyleSourceEditor sources;30 private SourceEditor sources; 31 31 private JCheckBox enableIconDefault; 32 32 private JCheckBox enableDefault; … … 81 81 public void stateChanged(ChangeEvent e) { 82 82 if (gui.mapcontent.getSelectedComponent() == panel) { 83 sources.initiallyLoadAvailableS tyles();83 sources.initiallyLoadAvailableSources(); 84 84 } 85 85 } … … 88 88 } 89 89 90 class MapPaintSourceEditor extends S tyleSourceEditor {90 class MapPaintSourceEditor extends SourceEditor { 91 91 92 92 final private String iconpref = "mappaint.icon.sources"; … … 103 103 @Override 104 104 public boolean finish() { 105 List<SourceEntry> activeStyles = activeS tylesModel.getStyles();105 List<SourceEntry> activeStyles = activeSourcesModel.getSources(); 106 106 107 107 boolean changed = (new MapPaintPrefMigration()).put(activeStyles); … … 122 122 123 123 @Override 124 public Collection< StyleSourceInfo> getDefault() {124 public Collection<ExtendedSourceEntry> getDefault() { 125 125 return (new MapPaintPrefMigration()).getDefault(); 126 126 } … … 138 138 case ACTIVE_SOURCES: 139 139 return tr("Active styles:"); 140 case NEW_SOURCE_ENTRY_TOOLTIP: 141 return tr("Add a new style by entering filename or URL"); 140 142 case NEW_SOURCE_ENTRY: 141 143 return tr("New style entry:"); … … 194 196 } 195 197 196 public static class MapPaintPrefMigration extends S tyleSourceEditor.SourcePrefMigration {198 public static class MapPaintPrefMigration extends SourceEditor.SourcePrefMigration { 197 199 198 200 public MapPaintPrefMigration() { … … 203 205 204 206 @Override 205 public Collection< StyleSourceInfo> getDefault() {206 StyleSourceInfo i = new StyleSourceInfo("elemstyles.xml", "resource://data/elemstyles.xml");207 public Collection<ExtendedSourceEntry> getDefault() { 208 ExtendedSourceEntry i = new ExtendedSourceEntry("elemstyles.xml", "resource://data/elemstyles.xml"); 207 209 i.name = "standard"; 208 210 i.shortdescription = tr("Internal Style");
Note:
See TracChangeset
for help on using the changeset viewer.