1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.gui.mappaint;
|
---|
3 |
|
---|
4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
5 |
|
---|
6 | import java.io.File;
|
---|
7 | import java.io.IOException;
|
---|
8 | import java.io.InputStreamReader;
|
---|
9 | import java.nio.charset.StandardCharsets;
|
---|
10 | import java.util.ArrayList;
|
---|
11 | import java.util.Arrays;
|
---|
12 | import java.util.Collection;
|
---|
13 | import java.util.Collections;
|
---|
14 | import java.util.HashSet;
|
---|
15 | import java.util.LinkedList;
|
---|
16 | import java.util.List;
|
---|
17 | import java.util.Set;
|
---|
18 | import java.util.concurrent.CopyOnWriteArrayList;
|
---|
19 |
|
---|
20 | import javax.swing.ImageIcon;
|
---|
21 | import javax.swing.SwingUtilities;
|
---|
22 |
|
---|
23 | import org.openstreetmap.josm.Main;
|
---|
24 | import org.openstreetmap.josm.data.coor.LatLon;
|
---|
25 | import org.openstreetmap.josm.data.osm.DataSet;
|
---|
26 | import org.openstreetmap.josm.data.osm.Node;
|
---|
27 | import org.openstreetmap.josm.data.osm.Tag;
|
---|
28 | import org.openstreetmap.josm.gui.PleaseWaitRunnable;
|
---|
29 | import org.openstreetmap.josm.gui.mappaint.StyleCache.StyleList;
|
---|
30 | import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource;
|
---|
31 | import org.openstreetmap.josm.gui.mappaint.styleelement.MapImage;
|
---|
32 | import org.openstreetmap.josm.gui.mappaint.styleelement.NodeElement;
|
---|
33 | import org.openstreetmap.josm.gui.mappaint.styleelement.StyleElement;
|
---|
34 | import org.openstreetmap.josm.gui.mappaint.xml.XmlStyleSource;
|
---|
35 | import org.openstreetmap.josm.gui.preferences.SourceEntry;
|
---|
36 | import org.openstreetmap.josm.gui.preferences.map.MapPaintPreference.MapPaintPrefHelper;
|
---|
37 | import org.openstreetmap.josm.gui.progress.ProgressMonitor;
|
---|
38 | import org.openstreetmap.josm.io.CachedFile;
|
---|
39 | import org.openstreetmap.josm.tools.ImageProvider;
|
---|
40 | import org.openstreetmap.josm.tools.Utils;
|
---|
41 |
|
---|
42 | /**
|
---|
43 | * This class manages the ElemStyles instance. The object you get with
|
---|
44 | * getStyles() is read only, any manipulation happens via one of
|
---|
45 | * the wrapper methods here. (readFromPreferences, moveStyles, ...)
|
---|
46 | *
|
---|
47 | * On change, mapPaintSylesUpdated() is fired for all listeners.
|
---|
48 | */
|
---|
49 | public final class MapPaintStyles {
|
---|
50 |
|
---|
51 | private static ElemStyles styles = new ElemStyles();
|
---|
52 |
|
---|
53 | /**
|
---|
54 | * Returns the {@link ElemStyles} instance.
|
---|
55 | * @return the {@code ElemStyles} instance
|
---|
56 | */
|
---|
57 | public static ElemStyles getStyles() {
|
---|
58 | return styles;
|
---|
59 | }
|
---|
60 |
|
---|
61 | private MapPaintStyles() {
|
---|
62 | // Hide default constructor for utils classes
|
---|
63 | }
|
---|
64 |
|
---|
65 | /**
|
---|
66 | * Value holder for a reference to a tag name. A style instruction
|
---|
67 | * <pre>
|
---|
68 | * text: a_tag_name;
|
---|
69 | * </pre>
|
---|
70 | * results in a tag reference for the tag <tt>a_tag_name</tt> in the
|
---|
71 | * style cascade.
|
---|
72 | */
|
---|
73 | public static class TagKeyReference {
|
---|
74 | public final String key;
|
---|
75 |
|
---|
76 | public TagKeyReference(String key) {
|
---|
77 | this.key = key;
|
---|
78 | }
|
---|
79 |
|
---|
80 | @Override
|
---|
81 | public String toString() {
|
---|
82 | return "TagKeyReference{" + "key='" + key + "'}";
|
---|
83 | }
|
---|
84 | }
|
---|
85 |
|
---|
86 | /**
|
---|
87 | * IconReference is used to remember the associated style source for
|
---|
88 | * each icon URL.
|
---|
89 | * This is necessary because image URLs can be paths relative
|
---|
90 | * to the source file and we have cascading of properties from different
|
---|
91 | * source files.
|
---|
92 | */
|
---|
93 | public static class IconReference {
|
---|
94 |
|
---|
95 | public final String iconName;
|
---|
96 | public final StyleSource source;
|
---|
97 |
|
---|
98 | public IconReference(String iconName, StyleSource source) {
|
---|
99 | this.iconName = iconName;
|
---|
100 | this.source = source;
|
---|
101 | }
|
---|
102 |
|
---|
103 | @Override
|
---|
104 | public String toString() {
|
---|
105 | return "IconReference{" + "iconName='" + iconName + "' source='" + source.getDisplayString() + "'}";
|
---|
106 | }
|
---|
107 | }
|
---|
108 |
|
---|
109 | /**
|
---|
110 | * Image provider for icon. Note that this is a provider only. A @link{ImageProvider#get()} call may still
|
---|
111 | * fail!
|
---|
112 | *
|
---|
113 | * @param ref reference to the requested icon
|
---|
114 | * @param test if <code>true</code> than the icon is request is tested
|
---|
115 | * @return image provider for icon (can be <code>null</code> when <code>test</code> is <code>true</code>).
|
---|
116 | * @see #getIcon(IconReference, int,int)
|
---|
117 | * @since 8097
|
---|
118 | */
|
---|
119 | public static ImageProvider getIconProvider(IconReference ref, boolean test) {
|
---|
120 | final String namespace = ref.source.getPrefName();
|
---|
121 | ImageProvider i = new ImageProvider(ref.iconName)
|
---|
122 | .setDirs(getIconSourceDirs(ref.source))
|
---|
123 | .setId("mappaint."+namespace)
|
---|
124 | .setArchive(ref.source.zipIcons)
|
---|
125 | .setInArchiveDir(ref.source.getZipEntryDirName())
|
---|
126 | .setOptional(true);
|
---|
127 | if (test && i.get() == null) {
|
---|
128 | Main.warn("Mappaint style \""+namespace+"\" ("+ref.source.getDisplayString()+") icon \"" + ref.iconName + "\" not found.");
|
---|
129 | return null;
|
---|
130 | }
|
---|
131 | return i;
|
---|
132 | }
|
---|
133 |
|
---|
134 | /**
|
---|
135 | * Return scaled icon.
|
---|
136 | *
|
---|
137 | * @param ref reference to the requested icon
|
---|
138 | * @param width icon width or -1 for autoscale
|
---|
139 | * @param height icon height or -1 for autoscale
|
---|
140 | * @return image icon or <code>null</code>.
|
---|
141 | * @see #getIconProvider(IconReference, boolean)
|
---|
142 | */
|
---|
143 | public static ImageIcon getIcon(IconReference ref, int width, int height) {
|
---|
144 | final String namespace = ref.source.getPrefName();
|
---|
145 | ImageIcon i = getIconProvider(ref, false).setWidth(width).setHeight(height).get();
|
---|
146 | if (i == null) {
|
---|
147 | Main.warn("Mappaint style \""+namespace+"\" ("+ref.source.getDisplayString()+") icon \"" + ref.iconName + "\" not found.");
|
---|
148 | return null;
|
---|
149 | }
|
---|
150 | return i;
|
---|
151 | }
|
---|
152 |
|
---|
153 | /**
|
---|
154 | * No icon with the given name was found, show a dummy icon instead
|
---|
155 | * @param source style source
|
---|
156 | * @return the icon misc/no_icon.png, in descending priority:
|
---|
157 | * - relative to source file
|
---|
158 | * - from user icon paths
|
---|
159 | * - josm's default icon
|
---|
160 | * can be null if the defaults are turned off by user
|
---|
161 | */
|
---|
162 | public static ImageIcon getNoIcon_Icon(StyleSource source) {
|
---|
163 | return new ImageProvider("misc/no_icon")
|
---|
164 | .setDirs(getIconSourceDirs(source))
|
---|
165 | .setId("mappaint."+source.getPrefName())
|
---|
166 | .setArchive(source.zipIcons)
|
---|
167 | .setInArchiveDir(source.getZipEntryDirName())
|
---|
168 | .setOptional(true).get();
|
---|
169 | }
|
---|
170 |
|
---|
171 | public static ImageIcon getNodeIcon(Tag tag) {
|
---|
172 | return getNodeIcon(tag, true);
|
---|
173 | }
|
---|
174 |
|
---|
175 | /**
|
---|
176 | * Returns the node icon that would be displayed for the given tag.
|
---|
177 | * @param tag The tag to look an icon for
|
---|
178 | * @param includeDeprecatedIcon if {@code true}, the special deprecated icon will be returned if applicable
|
---|
179 | * @return {@code null} if no icon found, or if the icon is deprecated and not wanted
|
---|
180 | */
|
---|
181 | public static ImageIcon getNodeIcon(Tag tag, boolean includeDeprecatedIcon) {
|
---|
182 | if (tag != null) {
|
---|
183 | DataSet ds = new DataSet();
|
---|
184 | Node virtualNode = new Node(LatLon.ZERO);
|
---|
185 | virtualNode.put(tag.getKey(), tag.getValue());
|
---|
186 | StyleList styleList;
|
---|
187 | MapCSSStyleSource.STYLE_SOURCE_LOCK.readLock().lock();
|
---|
188 | try {
|
---|
189 | // Add primitive to dataset to avoid DataIntegrityProblemException when evaluating selectors
|
---|
190 | ds.addPrimitive(virtualNode);
|
---|
191 | styleList = getStyles().generateStyles(virtualNode, 0.5, false).a;
|
---|
192 | ds.removePrimitive(virtualNode);
|
---|
193 | } finally {
|
---|
194 | MapCSSStyleSource.STYLE_SOURCE_LOCK.readLock().unlock();
|
---|
195 | }
|
---|
196 | if (styleList != null) {
|
---|
197 | for (StyleElement style : styleList) {
|
---|
198 | if (style instanceof NodeElement) {
|
---|
199 | MapImage mapImage = ((NodeElement) style).mapImage;
|
---|
200 | if (mapImage != null) {
|
---|
201 | if (includeDeprecatedIcon || mapImage.name == null || !"misc/deprecated.png".equals(mapImage.name)) {
|
---|
202 | return new ImageIcon(mapImage.getImage(false));
|
---|
203 | } else {
|
---|
204 | return null; // Deprecated icon found but not wanted
|
---|
205 | }
|
---|
206 | }
|
---|
207 | }
|
---|
208 | }
|
---|
209 | }
|
---|
210 | }
|
---|
211 | return null;
|
---|
212 | }
|
---|
213 |
|
---|
214 | public static List<String> getIconSourceDirs(StyleSource source) {
|
---|
215 | List<String> dirs = new LinkedList<>();
|
---|
216 |
|
---|
217 | File sourceDir = source.getLocalSourceDir();
|
---|
218 | if (sourceDir != null) {
|
---|
219 | dirs.add(sourceDir.getPath());
|
---|
220 | }
|
---|
221 |
|
---|
222 | Collection<String> prefIconDirs = Main.pref.getCollection("mappaint.icon.sources");
|
---|
223 | for (String fileset : prefIconDirs) {
|
---|
224 | String[] a;
|
---|
225 | if (fileset.indexOf('=') >= 0) {
|
---|
226 | a = fileset.split("=", 2);
|
---|
227 | } else {
|
---|
228 | a = new String[] {"", fileset};
|
---|
229 | }
|
---|
230 |
|
---|
231 | /* non-prefixed path is generic path, always take it */
|
---|
232 | if (a[0].isEmpty() || source.getPrefName().equals(a[0])) {
|
---|
233 | dirs.add(a[1]);
|
---|
234 | }
|
---|
235 | }
|
---|
236 |
|
---|
237 | if (Main.pref.getBoolean("mappaint.icon.enable-defaults", true)) {
|
---|
238 | /* don't prefix icon path, as it should be generic */
|
---|
239 | dirs.add("resource://images/styles/standard/");
|
---|
240 | dirs.add("resource://images/styles/");
|
---|
241 | }
|
---|
242 |
|
---|
243 | return dirs;
|
---|
244 | }
|
---|
245 |
|
---|
246 | public static void readFromPreferences() {
|
---|
247 | styles.clear();
|
---|
248 |
|
---|
249 | Collection<? extends SourceEntry> sourceEntries = MapPaintPrefHelper.INSTANCE.get();
|
---|
250 |
|
---|
251 | for (SourceEntry entry : sourceEntries) {
|
---|
252 | StyleSource source = fromSourceEntry(entry);
|
---|
253 | if (source != null) {
|
---|
254 | styles.add(source);
|
---|
255 | }
|
---|
256 | }
|
---|
257 | for (StyleSource source : styles.getStyleSources()) {
|
---|
258 | loadStyleForFirstTime(source);
|
---|
259 | }
|
---|
260 | fireMapPaintSylesUpdated();
|
---|
261 | }
|
---|
262 |
|
---|
263 | private static void loadStyleForFirstTime(StyleSource source) {
|
---|
264 | final long startTime = System.currentTimeMillis();
|
---|
265 | source.loadStyleSource();
|
---|
266 | if (Main.pref.getBoolean("mappaint.auto_reload_local_styles", true) && source.isLocal()) {
|
---|
267 | try {
|
---|
268 | Main.fileWatcher.registerStyleSource(source);
|
---|
269 | } catch (IOException e) {
|
---|
270 | Main.error(e);
|
---|
271 | }
|
---|
272 | }
|
---|
273 | if (Main.isDebugEnabled() || !source.getErrors().isEmpty()) {
|
---|
274 | final long elapsedTime = System.currentTimeMillis() - startTime;
|
---|
275 | String message = "Initializing map style " + source.url + " completed in " + Utils.getDurationString(elapsedTime);
|
---|
276 | if (!source.getErrors().isEmpty()) {
|
---|
277 | Main.warn(message + " (" + source.getErrors().size() + " errors)");
|
---|
278 | } else {
|
---|
279 | Main.debug(message);
|
---|
280 | }
|
---|
281 | }
|
---|
282 | }
|
---|
283 |
|
---|
284 | private static StyleSource fromSourceEntry(SourceEntry entry) {
|
---|
285 | CachedFile cf = null;
|
---|
286 | try {
|
---|
287 | Set<String> mimes = new HashSet<>();
|
---|
288 | mimes.addAll(Arrays.asList(XmlStyleSource.XML_STYLE_MIME_TYPES.split(", ")));
|
---|
289 | mimes.addAll(Arrays.asList(MapCSSStyleSource.MAPCSS_STYLE_MIME_TYPES.split(", ")));
|
---|
290 | cf = new CachedFile(entry.url).setHttpAccept(Utils.join(", ", mimes));
|
---|
291 | String zipEntryPath = cf.findZipEntryPath("mapcss", "style");
|
---|
292 | if (zipEntryPath != null) {
|
---|
293 | entry.isZip = true;
|
---|
294 | entry.zipEntryPath = zipEntryPath;
|
---|
295 | return new MapCSSStyleSource(entry);
|
---|
296 | }
|
---|
297 | zipEntryPath = cf.findZipEntryPath("xml", "style");
|
---|
298 | if (zipEntryPath != null)
|
---|
299 | return new XmlStyleSource(entry);
|
---|
300 | if (Utils.hasExtension(entry.url, "mapcss"))
|
---|
301 | return new MapCSSStyleSource(entry);
|
---|
302 | if (Utils.hasExtension(entry.url, "xml"))
|
---|
303 | return new XmlStyleSource(entry);
|
---|
304 | else {
|
---|
305 | try (InputStreamReader reader = new InputStreamReader(cf.getInputStream(), StandardCharsets.UTF_8)) {
|
---|
306 | WHILE: while (true) {
|
---|
307 | int c = reader.read();
|
---|
308 | switch (c) {
|
---|
309 | case -1:
|
---|
310 | break WHILE;
|
---|
311 | case ' ':
|
---|
312 | case '\t':
|
---|
313 | case '\n':
|
---|
314 | case '\r':
|
---|
315 | continue;
|
---|
316 | case '<':
|
---|
317 | return new XmlStyleSource(entry);
|
---|
318 | default:
|
---|
319 | return new MapCSSStyleSource(entry);
|
---|
320 | }
|
---|
321 | }
|
---|
322 | }
|
---|
323 | Main.warn("Could not detect style type. Using default (xml).");
|
---|
324 | return new XmlStyleSource(entry);
|
---|
325 | }
|
---|
326 | } catch (IOException e) {
|
---|
327 | Main.warn(tr("Failed to load Mappaint styles from ''{0}''. Exception was: {1}", entry.url, e.toString()));
|
---|
328 | Main.error(e);
|
---|
329 | }
|
---|
330 | return null;
|
---|
331 | }
|
---|
332 |
|
---|
333 | /**
|
---|
334 | * reload styles
|
---|
335 | * preferences are the same, but the file source may have changed
|
---|
336 | * @param sel the indices of styles to reload
|
---|
337 | */
|
---|
338 | public static void reloadStyles(final int... sel) {
|
---|
339 | List<StyleSource> toReload = new ArrayList<>();
|
---|
340 | List<StyleSource> data = styles.getStyleSources();
|
---|
341 | for (int i : sel) {
|
---|
342 | toReload.add(data.get(i));
|
---|
343 | }
|
---|
344 | Main.worker.submit(new MapPaintStyleLoader(toReload));
|
---|
345 | }
|
---|
346 |
|
---|
347 | public static class MapPaintStyleLoader extends PleaseWaitRunnable {
|
---|
348 | private boolean canceled;
|
---|
349 | private final Collection<StyleSource> sources;
|
---|
350 |
|
---|
351 | public MapPaintStyleLoader(Collection<StyleSource> sources) {
|
---|
352 | super(tr("Reloading style sources"));
|
---|
353 | this.sources = sources;
|
---|
354 | }
|
---|
355 |
|
---|
356 | @Override
|
---|
357 | protected void cancel() {
|
---|
358 | canceled = true;
|
---|
359 | }
|
---|
360 |
|
---|
361 | @Override
|
---|
362 | protected void finish() {
|
---|
363 | SwingUtilities.invokeLater(new Runnable() {
|
---|
364 | @Override
|
---|
365 | public void run() {
|
---|
366 | fireMapPaintSylesUpdated();
|
---|
367 | styles.clearCached();
|
---|
368 | if (Main.isDisplayingMapView()) {
|
---|
369 | Main.map.mapView.preferenceChanged(null);
|
---|
370 | Main.map.mapView.repaint();
|
---|
371 | }
|
---|
372 | }
|
---|
373 | });
|
---|
374 | }
|
---|
375 |
|
---|
376 | @Override
|
---|
377 | protected void realRun() {
|
---|
378 | ProgressMonitor monitor = getProgressMonitor();
|
---|
379 | monitor.setTicksCount(sources.size());
|
---|
380 | for (StyleSource s : sources) {
|
---|
381 | if (canceled)
|
---|
382 | return;
|
---|
383 | monitor.subTask(tr("loading style ''{0}''...", s.getDisplayString()));
|
---|
384 | s.loadStyleSource();
|
---|
385 | monitor.worked(1);
|
---|
386 | }
|
---|
387 | }
|
---|
388 | }
|
---|
389 |
|
---|
390 | /**
|
---|
391 | * Move position of entries in the current list of StyleSources
|
---|
392 | * @param sel The indices of styles to be moved.
|
---|
393 | * @param delta The number of lines it should move. positive int moves
|
---|
394 | * down and negative moves up.
|
---|
395 | */
|
---|
396 | public static void moveStyles(int[] sel, int delta) {
|
---|
397 | if (!canMoveStyles(sel, delta))
|
---|
398 | return;
|
---|
399 | int[] selSorted = Utils.copyArray(sel);
|
---|
400 | Arrays.sort(selSorted);
|
---|
401 | List<StyleSource> data = new ArrayList<>(styles.getStyleSources());
|
---|
402 | for (int row: selSorted) {
|
---|
403 | StyleSource t1 = data.get(row);
|
---|
404 | StyleSource t2 = data.get(row + delta);
|
---|
405 | data.set(row, t2);
|
---|
406 | data.set(row + delta, t1);
|
---|
407 | }
|
---|
408 | styles.setStyleSources(data);
|
---|
409 | MapPaintPrefHelper.INSTANCE.put(data);
|
---|
410 | fireMapPaintSylesUpdated();
|
---|
411 | styles.clearCached();
|
---|
412 | Main.map.mapView.repaint();
|
---|
413 | }
|
---|
414 |
|
---|
415 | public static boolean canMoveStyles(int[] sel, int i) {
|
---|
416 | if (sel.length == 0)
|
---|
417 | return false;
|
---|
418 | int[] selSorted = Utils.copyArray(sel);
|
---|
419 | Arrays.sort(selSorted);
|
---|
420 |
|
---|
421 | if (i < 0) // Up
|
---|
422 | return selSorted[0] >= -i;
|
---|
423 | else if (i > 0) // Down
|
---|
424 | return selSorted[selSorted.length-1] <= styles.getStyleSources().size() - 1 - i;
|
---|
425 | else
|
---|
426 | return true;
|
---|
427 | }
|
---|
428 |
|
---|
429 | public static void toggleStyleActive(int... sel) {
|
---|
430 | List<StyleSource> data = styles.getStyleSources();
|
---|
431 | for (int p : sel) {
|
---|
432 | StyleSource s = data.get(p);
|
---|
433 | s.active = !s.active;
|
---|
434 | }
|
---|
435 | MapPaintPrefHelper.INSTANCE.put(data);
|
---|
436 | if (sel.length == 1) {
|
---|
437 | fireMapPaintStyleEntryUpdated(sel[0]);
|
---|
438 | } else {
|
---|
439 | fireMapPaintSylesUpdated();
|
---|
440 | }
|
---|
441 | styles.clearCached();
|
---|
442 | Main.map.mapView.repaint();
|
---|
443 | }
|
---|
444 |
|
---|
445 | /**
|
---|
446 | * Add a new map paint style.
|
---|
447 | * @param entry map paint style
|
---|
448 | * @return list of errors that occured during loading
|
---|
449 | */
|
---|
450 | public static Collection<Throwable> addStyle(SourceEntry entry) {
|
---|
451 | StyleSource source = fromSourceEntry(entry);
|
---|
452 | if (source != null) {
|
---|
453 | styles.add(source);
|
---|
454 | loadStyleForFirstTime(source);
|
---|
455 | MapPaintPrefHelper.INSTANCE.put(styles.getStyleSources());
|
---|
456 | fireMapPaintSylesUpdated();
|
---|
457 | styles.clearCached();
|
---|
458 | if (Main.isDisplayingMapView()) {
|
---|
459 | Main.map.mapView.repaint();
|
---|
460 | }
|
---|
461 | return source.getErrors();
|
---|
462 | }
|
---|
463 | return Collections.emptyList();
|
---|
464 | }
|
---|
465 |
|
---|
466 | /***********************************
|
---|
467 | * MapPaintSylesUpdateListener & related code
|
---|
468 | * (get informed when the list of MapPaint StyleSources changes)
|
---|
469 | */
|
---|
470 |
|
---|
471 | public interface MapPaintSylesUpdateListener {
|
---|
472 | void mapPaintStylesUpdated();
|
---|
473 |
|
---|
474 | void mapPaintStyleEntryUpdated(int idx);
|
---|
475 | }
|
---|
476 |
|
---|
477 | private static final CopyOnWriteArrayList<MapPaintSylesUpdateListener> listeners
|
---|
478 | = new CopyOnWriteArrayList<>();
|
---|
479 |
|
---|
480 | public static void addMapPaintSylesUpdateListener(MapPaintSylesUpdateListener listener) {
|
---|
481 | if (listener != null) {
|
---|
482 | listeners.addIfAbsent(listener);
|
---|
483 | }
|
---|
484 | }
|
---|
485 |
|
---|
486 | public static void removeMapPaintSylesUpdateListener(MapPaintSylesUpdateListener listener) {
|
---|
487 | listeners.remove(listener);
|
---|
488 | }
|
---|
489 |
|
---|
490 | public static void fireMapPaintSylesUpdated() {
|
---|
491 | for (MapPaintSylesUpdateListener l : listeners) {
|
---|
492 | l.mapPaintStylesUpdated();
|
---|
493 | }
|
---|
494 | }
|
---|
495 |
|
---|
496 | public static void fireMapPaintStyleEntryUpdated(int idx) {
|
---|
497 | for (MapPaintSylesUpdateListener l : listeners) {
|
---|
498 | l.mapPaintStyleEntryUpdated(idx);
|
---|
499 | }
|
---|
500 | }
|
---|
501 | }
|
---|