Changeset 12825 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/loader/MapPaintStyleLoader.java
- Timestamp:
- 2017-09-11T20:43:41+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/loader/MapPaintStyleLoader.java
r12651 r12825 6 6 import java.util.ArrayList; 7 7 import java.util.Collection; 8 import java.util.Collections; 8 9 import java.util.List; 9 10 11 import org.openstreetmap.josm.data.preferences.sources.SourceEntry; 10 12 import org.openstreetmap.josm.gui.MainApplication; 11 13 import org.openstreetmap.josm.gui.PleaseWaitRunnable; … … 67 69 MainApplication.worker.submit(new MapPaintStyleLoader(toReload)); 68 70 } 71 72 /** 73 * Reload style. 74 * @param style {@link StyleSource} to reload 75 * @throws IllegalArgumentException if {@code style} is not a {@code StyleSource} instance 76 * @since 12825 77 */ 78 public static void reloadStyle(SourceEntry style) { 79 if (style instanceof StyleSource) { 80 MainApplication.worker.submit(new MapPaintStyleLoader(Collections.singleton((StyleSource) style))); 81 } else { 82 throw new IllegalArgumentException(style + " is not a StyleSource"); 83 } 84 } 69 85 }
Note:
See TracChangeset
for help on using the changeset viewer.