Class MapPaintPrefHelper
- java.lang.Object
-
- org.openstreetmap.josm.data.preferences.sources.SourcePrefHelper
-
- org.openstreetmap.josm.data.preferences.sources.MapPaintPrefHelper
-
public class MapPaintPrefHelper extends SourcePrefHelper
Helper class for map paint styles preferences.- Since:
- 12649 (extracted from gui.preferences package)
-
-
Field Summary
Fields Modifier and Type Field Description static MapPaintPrefHelperINSTANCEThe unique instance.-
Fields inherited from class org.openstreetmap.josm.data.preferences.sources.SourcePrefHelper
type
-
-
Constructor Summary
Constructors Constructor Description MapPaintPrefHelper()Constructs a newMapPaintPrefHelper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SourceEntrydeserialize(java.util.Map<java.lang.String,java.lang.String> s)Deserializes the given map as a source entry.java.util.List<SourceEntry>get()Returns the list of sources.java.util.Collection<ExtendedSourceEntry>getDefault()Returns the default sources provided by JOSM core.private booleaninsertNewDefaults(java.util.List<SourceEntry> list)If the selection of default styles changes in future releases, add the new entries to the user-configured list.java.util.Map<java.lang.String,java.lang.String>serialize(SourceEntry entry)Serializes the given source entry as a map.-
Methods inherited from class org.openstreetmap.josm.data.preferences.sources.SourcePrefHelper
getActiveUrls, put
-
-
-
-
Field Detail
-
INSTANCE
public static final MapPaintPrefHelper INSTANCE
The unique instance.
-
-
Constructor Detail
-
MapPaintPrefHelper
public MapPaintPrefHelper()
Constructs a newMapPaintPrefHelper.
-
-
Method Detail
-
get
public java.util.List<SourceEntry> get()
Description copied from class:SourcePrefHelperReturns the list of sources.- Overrides:
getin classSourcePrefHelper- Returns:
- The list of sources
-
insertNewDefaults
private boolean insertNewDefaults(java.util.List<SourceEntry> list)
If the selection of default styles changes in future releases, add the new entries to the user-configured list. Remember the known URLs, so an item that was deleted explicitly is not added again.- Parameters:
list- new defaults- Returns:
trueif a change occurred
-
getDefault
public java.util.Collection<ExtendedSourceEntry> getDefault()
Description copied from class:SourcePrefHelperReturns the default sources provided by JOSM core.- Specified by:
getDefaultin classSourcePrefHelper- Returns:
- the default sources provided by JOSM core
-
serialize
public java.util.Map<java.lang.String,java.lang.String> serialize(SourceEntry entry)
Description copied from class:SourcePrefHelperSerializes the given source entry as a map.- Overrides:
serializein classSourcePrefHelper- Parameters:
entry- source entry to serialize- Returns:
- map (key=value)
-
deserialize
public SourceEntry deserialize(java.util.Map<java.lang.String,java.lang.String> s)
Description copied from class:SourcePrefHelperDeserializes the given map as a source entry.- Overrides:
deserializein classSourcePrefHelper- Parameters:
s- map (key=value)- Returns:
- source entry
-
-