Ignore:
Timestamp:
2011-01-21T14:11:47+01:00 (13 years ago)
Author:
bastiK
Message:

rename some stuff: StyleSourceEditor is generic editor for both MapPaint styles andd Tagging Presets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/MapPaintPreference.java

    r3796 r3797  
    2424import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    2525import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
    26 import org.openstreetmap.josm.gui.preferences.StyleSourceEditor.StyleSourceInfo;
     26import org.openstreetmap.josm.gui.preferences.SourceEditor.ExtendedSourceEntry;
    2727import org.openstreetmap.josm.tools.GBC;
    2828
    2929public class MapPaintPreference implements PreferenceSetting {
    30     private StyleSourceEditor sources;
     30    private SourceEditor sources;
    3131    private JCheckBox enableIconDefault;
    3232    private JCheckBox enableDefault;
     
    8181                    public void stateChanged(ChangeEvent e) {
    8282                        if (gui.mapcontent.getSelectedComponent() == panel) {
    83                             sources.initiallyLoadAvailableStyles();
     83                            sources.initiallyLoadAvailableSources();
    8484                        }
    8585                    }
     
    8888    }
    8989
    90     class MapPaintSourceEditor extends StyleSourceEditor {
     90    class MapPaintSourceEditor extends SourceEditor {
    9191
    9292        final private String iconpref = "mappaint.icon.sources";
     
    103103        @Override
    104104        public boolean finish() {
    105             List<SourceEntry> activeStyles = activeStylesModel.getStyles();
     105            List<SourceEntry> activeStyles = activeSourcesModel.getSources();
    106106
    107107            boolean changed = (new MapPaintPrefMigration()).put(activeStyles);
     
    122122
    123123        @Override
    124         public Collection<StyleSourceInfo> getDefault() {
     124        public Collection<ExtendedSourceEntry> getDefault() {
    125125            return (new MapPaintPrefMigration()).getDefault();
    126126        }
     
    138138                case ACTIVE_SOURCES:
    139139                    return tr("Active styles:");
     140                case NEW_SOURCE_ENTRY_TOOLTIP:
     141                     return tr("Add a new style by entering filename or URL");
    140142                case NEW_SOURCE_ENTRY:
    141143                    return tr("New style entry:");
     
    194196    }
    195197
    196     public static class MapPaintPrefMigration extends StyleSourceEditor.SourcePrefMigration {
     198    public static class MapPaintPrefMigration extends SourceEditor.SourcePrefMigration {
    197199
    198200        public MapPaintPrefMigration() {
     
    203205
    204206        @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");
    207209            i.name = "standard";
    208210            i.shortdescription = tr("Internal Style");
Note: See TracChangeset for help on using the changeset viewer.