source: josm/trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java@ 4087

Last change on this file since 4087 was 4087, checked in by bastiK, 13 years ago

PaintVisitor refactoring, includes hook for external MapRenderers (author: Gubaer)

  • Property svn:eol-style set to native
File size: 23.9 KB
Line 
1// License: GPL. See LICENSE file for details.
2
3package org.openstreetmap.josm.gui.layer;
4
5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
6import static org.openstreetmap.josm.tools.I18n.marktr;
7import static org.openstreetmap.josm.tools.I18n.tr;
8import static org.openstreetmap.josm.tools.I18n.trn;
9
10import java.awt.AlphaComposite;
11import java.awt.Color;
12import java.awt.Composite;
13import java.awt.Graphics2D;
14import java.awt.GridBagLayout;
15import java.awt.Point;
16import java.awt.Rectangle;
17import java.awt.TexturePaint;
18import java.awt.event.ActionEvent;
19import java.awt.geom.Area;
20import java.awt.image.BufferedImage;
21import java.io.File;
22import java.util.ArrayList;
23import java.util.Collection;
24import java.util.HashMap;
25import java.util.HashSet;
26import java.util.List;
27import java.util.Map;
28
29import javax.swing.AbstractAction;
30import javax.swing.Action;
31import javax.swing.Icon;
32import javax.swing.JLabel;
33import javax.swing.JOptionPane;
34import javax.swing.JPanel;
35import javax.swing.JScrollPane;
36import javax.swing.JTextArea;
37
38import org.openstreetmap.josm.Main;
39import org.openstreetmap.josm.actions.RenameLayerAction;
40import org.openstreetmap.josm.data.Bounds;
41import org.openstreetmap.josm.data.SelectionChangedListener;
42import org.openstreetmap.josm.data.conflict.Conflict;
43import org.openstreetmap.josm.data.conflict.ConflictCollection;
44import org.openstreetmap.josm.data.coor.LatLon;
45import org.openstreetmap.josm.data.gpx.GpxData;
46import org.openstreetmap.josm.data.gpx.ImmutableGpxTrack;
47import org.openstreetmap.josm.data.gpx.WayPoint;
48import org.openstreetmap.josm.data.osm.DataIntegrityProblemException;
49import org.openstreetmap.josm.data.osm.DataSet;
50import org.openstreetmap.josm.data.osm.DataSetMerger;
51import org.openstreetmap.josm.data.osm.DataSource;
52import org.openstreetmap.josm.data.osm.DatasetConsistencyTest;
53import org.openstreetmap.josm.data.osm.Node;
54import org.openstreetmap.josm.data.osm.OsmPrimitive;
55import org.openstreetmap.josm.data.osm.Relation;
56import org.openstreetmap.josm.data.osm.Way;
57import org.openstreetmap.josm.data.osm.event.AbstractDatasetChangedEvent;
58import org.openstreetmap.josm.data.osm.event.DataSetListenerAdapter;
59import org.openstreetmap.josm.data.osm.event.DataSetListenerAdapter.Listener;
60import org.openstreetmap.josm.data.osm.visitor.AbstractVisitor;
61import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
62import org.openstreetmap.josm.data.osm.visitor.paint.MapRendererFactory;
63import org.openstreetmap.josm.data.osm.visitor.paint.Rendering;
64import org.openstreetmap.josm.data.validation.TestError;
65import org.openstreetmap.josm.gui.HelpAwareOptionPane;
66import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec;
67import org.openstreetmap.josm.gui.MapView;
68import org.openstreetmap.josm.gui.dialogs.LayerListDialog;
69import org.openstreetmap.josm.gui.dialogs.LayerListPopup;
70import org.openstreetmap.josm.tools.DateUtils;
71import org.openstreetmap.josm.tools.FilteredCollection;
72import org.openstreetmap.josm.tools.GBC;
73import org.openstreetmap.josm.tools.ImageProvider;
74
75/**
76 * A layer holding data from a specific dataset.
77 * The data can be fully edited.
78 *
79 * @author imi
80 */
81public class OsmDataLayer extends Layer implements Listener, SelectionChangedListener {
82 static public final String REQUIRES_SAVE_TO_DISK_PROP = OsmDataLayer.class.getName() + ".requiresSaveToDisk";
83 static public final String REQUIRES_UPLOAD_TO_SERVER_PROP = OsmDataLayer.class.getName() + ".requiresUploadToServer";
84
85 private boolean requiresSaveToFile = false;
86 private boolean requiresUploadToServer = false;
87 private boolean isChanged = true;
88 private int highlightUpdateCount;
89
90 public List<TestError> validationErrors = new ArrayList<TestError>();
91
92 protected void setRequiresSaveToFile(boolean newValue) {
93 boolean oldValue = requiresSaveToFile;
94 requiresSaveToFile = newValue;
95 if (oldValue != newValue) {
96 propertyChangeSupport.firePropertyChange(REQUIRES_SAVE_TO_DISK_PROP, oldValue, newValue);
97 }
98 }
99
100 protected void setRequiresUploadToServer(boolean newValue) {
101 boolean oldValue = requiresUploadToServer;
102 requiresUploadToServer = newValue;
103 if (oldValue != newValue) {
104 propertyChangeSupport.firePropertyChange(REQUIRES_UPLOAD_TO_SERVER_PROP, oldValue, newValue);
105 }
106 }
107
108 /** the global counter for created data layers */
109 static private int dataLayerCounter = 0;
110
111 /**
112 * Replies a new unique name for a data layer
113 *
114 * @return a new unique name for a data layer
115 */
116 static public String createNewName() {
117 dataLayerCounter++;
118 return tr("Data Layer {0}", dataLayerCounter);
119 }
120
121 public final static class DataCountVisitor extends AbstractVisitor {
122 public int nodes;
123 public int ways;
124 public int relations;
125 public int deletedNodes;
126 public int deletedWays;
127 public int deletedRelations;
128
129 public void visit(final Node n) {
130 nodes++;
131 if (n.isDeleted()) {
132 deletedNodes++;
133 }
134 }
135
136 public void visit(final Way w) {
137 ways++;
138 if (w.isDeleted()) {
139 deletedWays++;
140 }
141 }
142
143 public void visit(final Relation r) {
144 relations++;
145 if (r.isDeleted()) {
146 deletedRelations++;
147 }
148 }
149 }
150
151 public interface CommandQueueListener {
152 void commandChanged(int queueSize, int redoSize);
153 }
154
155 /**
156 * The data behind this layer.
157 */
158 public final DataSet data;
159
160 /**
161 * the collection of conflicts detected in this layer
162 */
163 private ConflictCollection conflicts;
164
165 /**
166 * a paint texture for non-downloaded area
167 */
168 private static TexturePaint hatched;
169
170 static {
171 createHatchTexture();
172 }
173
174 public static Color getBackgroundColor() {
175 return Main.pref.getColor(marktr("background"), Color.BLACK);
176 }
177
178 public static Color getOutsideColor() {
179 return Main.pref.getColor(marktr("outside downloaded area"), Color.YELLOW);
180 }
181
182 /**
183 * Initialize the hatch pattern used to paint the non-downloaded area
184 */
185 public static void createHatchTexture() {
186 BufferedImage bi = new BufferedImage(15, 15, BufferedImage.TYPE_INT_ARGB);
187 Graphics2D big = bi.createGraphics();
188 big.setColor(getBackgroundColor());
189 Composite comp = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.3f);
190 big.setComposite(comp);
191 big.fillRect(0,0,15,15);
192 big.setColor(getOutsideColor());
193 big.drawLine(0,15,15,0);
194 Rectangle r = new Rectangle(0, 0, 15,15);
195 hatched = new TexturePaint(bi, r);
196 }
197
198 /**
199 * Construct a OsmDataLayer.
200 */
201 public OsmDataLayer(final DataSet data, final String name, final File associatedFile) {
202 super(name);
203 this.data = data;
204 this.setAssociatedFile(associatedFile);
205 conflicts = new ConflictCollection();
206 data.addDataSetListener(new DataSetListenerAdapter(this));
207 DataSet.addSelectionListener(this);
208 }
209
210 /**
211 * TODO: @return Return a dynamic drawn icon of the map data. The icon is
212 * updated by a background thread to not disturb the running programm.
213 */
214 @Override public Icon getIcon() {
215 return ImageProvider.get("layer", "osmdata_small");
216 }
217
218 /**
219 * Draw all primitives in this layer but do not draw modified ones (they
220 * are drawn by the edit layer).
221 * Draw nodes last to overlap the ways they belong to.
222 */
223 @Override public void paint(final Graphics2D g, final MapView mv, Bounds box) {
224 isChanged = false;
225 highlightUpdateCount = data.getHighlightUpdateCount();
226
227 boolean active = mv.getActiveLayer() == this;
228 boolean inactive = !active && Main.pref.getBoolean("draw.data.inactive_color", true);
229 boolean virtual = !inactive && mv.isVirtualNodesEnabled();
230
231 // draw the hatched area for non-downloaded region. only draw if we're the active
232 // and bounds are defined; don't draw for inactive layers or loaded GPX files etc
233 if (active && Main.pref.getBoolean("draw.data.downloaded_area", true) && !data.dataSources.isEmpty()) {
234 // initialize area with current viewport
235 Rectangle b = mv.getBounds();
236 // on some platforms viewport bounds seem to be offset from the left,
237 // over-grow it just to be sure
238 b.grow(100, 100);
239 Area a = new Area(b);
240
241 // now successively subtract downloaded areas
242 for (Bounds bounds : data.getDataSourceBounds()) {
243 if (bounds.isCollapsed()) {
244 continue;
245 }
246 Point p1 = mv.getPoint(bounds.getMin());
247 Point p2 = mv.getPoint(bounds.getMax());
248 Rectangle r = new Rectangle(Math.min(p1.x, p2.x),Math.min(p1.y, p2.y),Math.abs(p2.x-p1.x),Math.abs(p2.y-p1.y));
249 a.subtract(new Area(r));
250 }
251
252 // paint remainder
253 g.setPaint(hatched);
254 g.fill(a);
255 }
256
257 Rendering painter = MapRendererFactory.getInstance().createActiveRenderer(g, mv, inactive);
258 painter.render(data, virtual, box);
259 Main.map.conflictDialog.paintConflicts(g, mv);
260 }
261
262 @Override public String getToolTipText() {
263 int nodes = new FilteredCollection<Node>(data.getNodes(), OsmPrimitive.nonDeletedPredicate).size();
264 int ways = new FilteredCollection<Way>(data.getWays(), OsmPrimitive.nonDeletedPredicate).size();
265
266 String tool = trn("{0} node", "{0} nodes", nodes, nodes)+", ";
267 tool += trn("{0} way", "{0} ways", ways, ways);
268
269 if (data.getVersion() != null) {
270 tool += ", " + tr("version {0}", data.getVersion());
271 }
272 File f = getAssociatedFile();
273 if (f != null) {
274 tool = "<html>"+tool+"<br>"+f.getPath()+"</html>";
275 }
276 return tool;
277 }
278
279 @Override public void mergeFrom(final Layer from) {
280 mergeFrom(((OsmDataLayer)from).data);
281 }
282
283 /**
284 * merges the primitives in dataset <code>from</code> into the dataset of
285 * this layer
286 *
287 * @param from the source data set
288 */
289 public void mergeFrom(final DataSet from) {
290 final DataSetMerger visitor = new DataSetMerger(data,from);
291 try {
292 visitor.merge();
293 } catch (DataIntegrityProblemException e) {
294 JOptionPane.showMessageDialog(
295 Main.parent,
296 e.getMessage(),
297 tr("Error"),
298 JOptionPane.ERROR_MESSAGE
299 );
300 return;
301
302 }
303
304 Area a = data.getDataSourceArea();
305
306 // copy the merged layer's data source info;
307 // only add source rectangles if they are not contained in the
308 // layer already.
309 for (DataSource src : from.dataSources) {
310 if (a == null || !a.contains(src.bounds.asRect())) {
311 data.dataSources.add(src);
312 }
313 }
314
315 // copy the merged layer's API version, downgrade if required
316 if (data.getVersion() == null) {
317 data.setVersion(from.getVersion());
318 } else if ("0.5".equals(data.getVersion()) ^ "0.5".equals(from.getVersion())) {
319 System.err.println(tr("Warning: mixing 0.6 and 0.5 data results in version 0.5"));
320 data.setVersion("0.5");
321 }
322
323 int numNewConflicts = 0;
324 for (Conflict<?> c : visitor.getConflicts()) {
325 if (!conflicts.hasConflict(c)) {
326 numNewConflicts++;
327 conflicts.add(c);
328 }
329 }
330 // repaint to make sure new data is displayed properly.
331 Main.map.mapView.repaint();
332 warnNumNewConflicts(numNewConflicts);
333 }
334
335 /**
336 * Warns the user about the number of detected conflicts
337 *
338 * @param numNewConflicts the number of detected conflicts
339 */
340 protected void warnNumNewConflicts(int numNewConflicts) {
341 if (numNewConflicts == 0) return;
342
343 String msg1 = trn(
344 "There was {0} conflict detected.",
345 "There were {0} conflicts detected.",
346 numNewConflicts,
347 numNewConflicts
348 );
349
350 StringBuffer sb = new StringBuffer();
351 sb.append("<html>").append(msg1).append("</html>");
352 if (numNewConflicts > 0) {
353 ButtonSpec[] options = new ButtonSpec[] {
354 new ButtonSpec(
355 tr("OK"),
356 ImageProvider.get("ok"),
357 tr("Click to close this dialog and continue editing"),
358 null /* no specific help */
359 )
360 };
361 HelpAwareOptionPane.showOptionDialog(
362 Main.parent,
363 sb.toString(),
364 tr("Conflicts detected"),
365 JOptionPane.WARNING_MESSAGE,
366 null, /* no icon */
367 options,
368 options[0],
369 ht("/Concepts/Conflict#WarningAboutDetectedConflicts")
370 );
371 Main.map.conflictDialog.unfurlDialog();
372 Main.map.repaint();
373 }
374 }
375
376
377 @Override public boolean isMergable(final Layer other) {
378 return other instanceof OsmDataLayer;
379 }
380
381 @Override public void visitBoundingBox(final BoundingXYVisitor v) {
382 for (final Node n: data.getNodes()) {
383 if (n.isUsable()) {
384 v.visit(n);
385 }
386 }
387 }
388
389 /**
390 * Clean out the data behind the layer. This means clearing the redo/undo lists,
391 * really deleting all deleted objects and reset the modified flags. This should
392 * be done after an upload, even after a partial upload.
393 *
394 * @param processed A list of all objects that were actually uploaded.
395 * May be <code>null</code>, which means nothing has been uploaded
396 */
397 public void cleanupAfterUpload(final Collection<OsmPrimitive> processed) {
398 // return immediately if an upload attempt failed
399 if (processed == null || processed.isEmpty())
400 return;
401
402 Main.main.undoRedo.clean(this);
403
404 // if uploaded, clean the modified flags as well
405 data.cleanupDeletedPrimitives();
406 for (OsmPrimitive p: data.allPrimitives()) {
407 if (processed.contains(p)) {
408 p.setModified(false);
409 }
410 }
411 }
412
413
414 @Override public Object getInfoComponent() {
415 final DataCountVisitor counter = new DataCountVisitor();
416 for (final OsmPrimitive osm : data.allPrimitives()) {
417 osm.visit(counter);
418 }
419 final JPanel p = new JPanel(new GridBagLayout());
420
421 String nodeText = trn("{0} node", "{0} nodes", counter.nodes, counter.nodes);
422 if (counter.deletedNodes > 0) {
423 nodeText += " ("+trn("{0} deleted", "{0} deleted", counter.deletedNodes, counter.deletedNodes)+")";
424 }
425
426 String wayText = trn("{0} way", "{0} ways", counter.ways, counter.ways);
427 if (counter.deletedWays > 0) {
428 wayText += " ("+trn("{0} deleted", "{0} deleted", counter.deletedWays, counter.deletedWays)+")";
429 }
430
431 String relationText = trn("{0} relation", "{0} relations", counter.relations, counter.relations);
432 if (counter.deletedRelations > 0) {
433 relationText += " ("+trn("{0} deleted", "{0} deleted", counter.deletedRelations, counter.deletedRelations)+")";
434 }
435
436 p.add(new JLabel(tr("{0} consists of:", getName())), GBC.eol());
437 p.add(new JLabel(nodeText, ImageProvider.get("data", "node"), JLabel.HORIZONTAL), GBC.eop().insets(15,0,0,0));
438 p.add(new JLabel(wayText, ImageProvider.get("data", "way"), JLabel.HORIZONTAL), GBC.eop().insets(15,0,0,0));
439 p.add(new JLabel(relationText, ImageProvider.get("data", "relation"), JLabel.HORIZONTAL), GBC.eop().insets(15,0,0,0));
440 p.add(new JLabel(tr("API version: {0}", (data.getVersion() != null) ? data.getVersion() : tr("unset"))));
441
442 return p;
443 }
444
445 @Override public Action[] getMenuEntries() {
446 if (Main.applet)
447 return new Action[]{
448 LayerListDialog.getInstance().createActivateLayerAction(this),
449 LayerListDialog.getInstance().createShowHideLayerAction(),
450 LayerListDialog.getInstance().createDeleteLayerAction(),
451 SeparatorLayerAction.INSTANCE,
452 LayerListDialog.getInstance().createMergeLayerAction(this),
453 SeparatorLayerAction.INSTANCE,
454 new RenameLayerAction(getAssociatedFile(), this),
455 new ConsistencyTestAction(),
456 SeparatorLayerAction.INSTANCE,
457 new LayerListPopup.InfoAction(this)};
458 return new Action[]{
459 LayerListDialog.getInstance().createActivateLayerAction(this),
460 LayerListDialog.getInstance().createShowHideLayerAction(),
461 LayerListDialog.getInstance().createDeleteLayerAction(),
462 SeparatorLayerAction.INSTANCE,
463 LayerListDialog.getInstance().createMergeLayerAction(this),
464 new LayerSaveAction(this),
465 new LayerSaveAsAction(this),
466 new LayerGpxExportAction(this),
467 new ConvertToGpxLayerAction(),
468 SeparatorLayerAction.INSTANCE,
469 new RenameLayerAction(getAssociatedFile(), this),
470 new ConsistencyTestAction(),
471 SeparatorLayerAction.INSTANCE,
472 new LayerListPopup.InfoAction(this)};
473 }
474
475 public static GpxData toGpxData(DataSet data, File file) {
476 GpxData gpxData = new GpxData();
477 gpxData.storageFile = file;
478 HashSet<Node> doneNodes = new HashSet<Node>();
479 for (Way w : data.getWays()) {
480 if (!w.isUsable()) {
481 continue;
482 }
483 Collection<Collection<WayPoint>> trk = new ArrayList<Collection<WayPoint>>();
484 Map<String, Object> trkAttr = new HashMap<String, Object>();
485
486 if (w.get("name") != null) {
487 trkAttr.put("name", w.get("name"));
488 }
489
490 List<WayPoint> trkseg = null;
491 for (Node n : w.getNodes()) {
492 if (!n.isUsable()) {
493 trkseg = null;
494 continue;
495 }
496 if (trkseg == null) {
497 trkseg = new ArrayList<WayPoint>();
498 trk.add(trkseg);
499 }
500 if (!n.isTagged()) {
501 doneNodes.add(n);
502 }
503 WayPoint wpt = new WayPoint(n.getCoor());
504 if (!n.isTimestampEmpty()) {
505 wpt.attr.put("time", DateUtils.fromDate(n.getTimestamp()));
506 wpt.setTime();
507 }
508 trkseg.add(wpt);
509 }
510
511 gpxData.tracks.add(new ImmutableGpxTrack(trk, trkAttr));
512 }
513
514 for (Node n : data.getNodes()) {
515 if (n.isIncomplete() || n.isDeleted() || doneNodes.contains(n)) {
516 continue;
517 }
518 String name = n.get("name");
519 if (name == null) {
520 continue;
521 }
522 WayPoint wpt = new WayPoint(n.getCoor());
523 wpt.attr.put("name", name);
524 if (!n.isTimestampEmpty()) {
525 wpt.attr.put("time", DateUtils.fromDate(n.getTimestamp()));
526 wpt.setTime();
527 }
528 String desc = n.get("description");
529 if (desc != null) {
530 wpt.attr.put("desc", desc);
531 }
532
533 gpxData.waypoints.add(wpt);
534 }
535 return gpxData;
536 }
537
538 public GpxData toGpxData() {
539 return toGpxData(data, getAssociatedFile());
540 }
541
542 public class ConvertToGpxLayerAction extends AbstractAction {
543 public ConvertToGpxLayerAction() {
544 super(tr("Convert to GPX layer"), ImageProvider.get("converttogpx"));
545 }
546 public void actionPerformed(ActionEvent e) {
547 Main.main.addLayer(new GpxLayer(toGpxData(), tr("Converted from: {0}", getName())));
548 Main.main.removeLayer(OsmDataLayer.this);
549 }
550 }
551
552 public boolean containsPoint(LatLon coor) {
553 // we'll assume that if this has no data sources
554 // that it also has no borders
555 if (this.data.dataSources.isEmpty())
556 return true;
557
558 boolean layer_bounds_point = false;
559 for (DataSource src : this.data.dataSources) {
560 if (src.bounds.contains(coor)) {
561 layer_bounds_point = true;
562 break;
563 }
564 }
565 return layer_bounds_point;
566 }
567
568 /**
569 * replies the set of conflicts currently managed in this layer
570 *
571 * @return the set of conflicts currently managed in this layer
572 */
573 public ConflictCollection getConflicts() {
574 return conflicts;
575 }
576
577 /**
578 * Replies true if the data managed by this layer needs to be uploaded to
579 * the server because it contains at least one modified primitive.
580 *
581 * @return true if the data managed by this layer needs to be uploaded to
582 * the server because it contains at least one modified primitive; false,
583 * otherwise
584 */
585 public boolean requiresUploadToServer() {
586 return requiresUploadToServer;
587 }
588
589 /**
590 * Replies true if the data managed by this layer needs to be saved to
591 * a file. Only replies true if a file is assigned to this layer and
592 * if the data managed by this layer has been modified since the last
593 * save operation to the file.
594 *
595 * @return true if the data managed by this layer needs to be saved to
596 * a file
597 */
598 public boolean requiresSaveToFile() {
599 return getAssociatedFile() != null && requiresSaveToFile;
600 }
601
602 /**
603 * Initializes the layer after a successful load of OSM data from a file
604 *
605 */
606 public void onPostLoadFromFile() {
607 setRequiresSaveToFile(false);
608 setRequiresUploadToServer(data.isModified());
609 }
610
611 public void onPostDownloadFromServer() {
612 setRequiresSaveToFile(true);
613 setRequiresUploadToServer(data.isModified());
614 }
615
616 @Override
617 public boolean isChanged() {
618 return isChanged || highlightUpdateCount != data.getHighlightUpdateCount();
619 }
620
621 /**
622 * Initializes the layer after a successful save of OSM data to a file
623 *
624 */
625 public void onPostSaveToFile() {
626 setRequiresSaveToFile(false);
627 setRequiresUploadToServer(data.isModified());
628 }
629
630 /**
631 * Initializes the layer after a successful upload to the server
632 *
633 */
634 public void onPostUploadToServer() {
635 setRequiresUploadToServer(data.isModified());
636 // keep requiresSaveToDisk unchanged
637 }
638
639 private class ConsistencyTestAction extends AbstractAction {
640
641 public ConsistencyTestAction() {
642 super(tr("Dataset consistency test"));
643 }
644
645 public void actionPerformed(ActionEvent e) {
646 String result = DatasetConsistencyTest.runTests(data);
647 if (result.length() == 0) {
648 JOptionPane.showMessageDialog(Main.parent, tr("No problems found"));
649 } else {
650 JPanel p = new JPanel(new GridBagLayout());
651 p.add(new JLabel(tr("Following problems found:")), GBC.eol());
652 JTextArea info = new JTextArea(result, 20, 60);
653 info.setCaretPosition(0);
654 info.setEditable(false);
655 p.add(new JScrollPane(info), GBC.eop());
656
657 JOptionPane.showMessageDialog(Main.parent, p, tr("Warning"), JOptionPane.WARNING_MESSAGE);
658 }
659 }
660
661 }
662
663 @Override
664 public void destroy() {
665 DataSet.removeSelectionListener(this);
666 }
667
668 public void processDatasetEvent(AbstractDatasetChangedEvent event) {
669 isChanged = true;
670 setRequiresSaveToFile(true);
671 setRequiresUploadToServer(true);
672 }
673
674 public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
675 isChanged = true;
676 }
677}
Note: See TracBrowser for help on using the repository browser.