Changeset 33248 in osm for applications/editors/josm/plugins/junctionchecking/src
- Timestamp:
- 2017-04-17T01:11:12+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/ChannelDiGraphLayer.java
r32596 r33248 12 12 import java.awt.geom.AffineTransform; 13 13 import java.awt.geom.Line2D; 14 import java.beans.PropertyChangeEvent;15 import java.beans.PropertyChangeListener;16 14 17 15 import javax.swing.Action; … … 24 22 import org.openstreetmap.josm.gui.MapView; 25 23 import org.openstreetmap.josm.gui.layer.Layer; 26 import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent;27 import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener;28 import org.openstreetmap.josm.gui.layer.LayerManager.LayerOrderChangeEvent;29 import org.openstreetmap.josm.gui.layer.LayerManager.LayerRemoveEvent;30 24 import org.openstreetmap.josm.plugins.JunctionChecker.datastructure.Channel; 31 25 import org.openstreetmap.josm.plugins.JunctionChecker.datastructure.ChannelDiGraph; … … 38 32 * 39 33 */ 40 public class ChannelDiGraphLayer extends Layer implements LayerChangeListener, PropertyChangeListener{34 public class ChannelDiGraphLayer extends Layer { 41 35 42 36 private ChannelDiGraph digraph; … … 65 59 public ChannelDiGraphLayer(ColorSchemeXMLReader cXMLReader) { 66 60 super("ChannelDiGraphLayer"); 67 Main.getLayerManager().addLayerChangeListener(this);68 61 this.cXMLReader = cXMLReader; 69 62 initColors(); … … 187 180 } 188 181 189 @Override190 public void layerOrderChanged(LayerOrderChangeEvent e) {191 }192 193 @Override194 public void layerAdded(LayerAddEvent e) {195 }196 197 @Override198 public void layerRemoving(LayerRemoveEvent e) {199 if (e.getRemovedLayer() == this) {200 Main.getLayerManager().removeLayerChangeListener(this);201 }202 }203 204 182 public ChannelDiGraph getDigraph() { 205 183 return digraph; … … 209 187 this.digraph = digraph; 210 188 } 211 212 @Override213 public void propertyChange(PropertyChangeEvent evt) {214 }215 189 } -
applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/DigraphCreationTask.java
r33163 r33248 56 56 protected void finish() { 57 57 if (canceled) { 58 Main.getLayerManager().removeLayer(plugin.getChannelDigraphLayer()); 59 return; 58 removeDigraphLayer(); 59 } 60 } 61 62 private void removeDigraphLayer() { 63 ChannelDiGraphLayer layer = plugin.getChannelDigraphLayer(); 64 if (Main.getLayerManager().containsLayer(layer)) { 65 Main.getLayerManager().removeLayer(layer); 60 66 } 61 67 } … … 70 76 return; 71 77 } 72 Main.getLayerManager().removeLayer(plugin.getChannelDigraphLayer());78 removeDigraphLayer(); 73 79 int tickscounter = 4; 74 80 if (sealGraph) { -
applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckTask.java
r32596 r33248 55 55 showjunction(); 56 56 JOptionPane.showMessageDialog(Main.parent, 57 57 tr("The marked channels contains a junctioncandidate (white). To test this candidat mark these channel and press the \"Check\" button again.")); 58 58 } else if (jc.getCheck()) { 59 59 showjunction();
Note:
See TracChangeset
for help on using the changeset viewer.