diff --git a/graphview/build.xml b/graphview/build.xml
index b44734a..131ace2 100644
|
a
|
b
|
|
| 1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | 2 | <project name="graphview" default="dist" basedir="."> |
| 3 | 3 | <property name="commit.message" value="option to change graph colors; closes ticket 5523 in JOSM Trac"/> |
| 4 | | <property name="plugin.main.version" value="7001"/> |
| | 4 | <property name="plugin.main.version" value="10031"/> |
| 5 | 5 | |
| 6 | 6 | <!-- Configure these properties (replace "..." accordingly). |
| 7 | 7 | See https://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins |
diff --git a/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/GraphViewPlugin.java b/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/GraphViewPlugin.java
index 897caf1..6864d1b 100644
|
a
|
b
|
public class GraphViewPlugin extends Plugin implements LayerChangeListener, Obse
|
| 177 | 177 | public void repaintGraphViewLayer() { |
| 178 | 178 | |
| 179 | 179 | if (graphViewLayer != null) { |
| 180 | | Main.panel.repaint(); |
| | 180 | graphViewLayer.invalidate(); |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | } |
diff --git a/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/layer/GraphViewLayer.java b/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/layer/GraphViewLayer.java
index 31cfc10..02bef01 100644
|
a
|
b
|
import org.openstreetmap.josm.tools.ImageProvider;
|
| 45 | 45 | /** |
| 46 | 46 | * layer for displaying the graph visualization |
| 47 | 47 | */ |
| 48 | | public class GraphViewLayer extends Layer implements LayerChangeListener, WayGraphObserver { |
| | 48 | public class GraphViewLayer extends Layer implements WayGraphObserver { |
| 49 | 49 | |
| 50 | 50 | private static final int NODE_RADIUS = 5; |
| 51 | 51 | |
| … |
… |
public class GraphViewLayer extends Layer implements LayerChangeListener, WayGra
|
| 97 | 97 | |
| 98 | 98 | public GraphViewLayer() { |
| 99 | 99 | super("Graph view"); |
| 100 | | MapView.addLayerChangeListener(this); |
| 101 | 100 | } |
| 102 | 101 | |
| 103 | 102 | /** sets the WayGraph that is to be displayed by this layer, may be null */ |
| … |
… |
public class GraphViewLayer extends Layer implements LayerChangeListener, WayGra
|
| 114 | 113 | /** sets the ColorScheme that is to be used for choosing colors, may be null */ |
| 115 | 114 | public void setColorScheme(ColorScheme colorScheme) { |
| 116 | 115 | this.colorScheme = colorScheme; |
| 117 | | Main.panel.repaint(); |
| | 116 | invalidate(); |
| 118 | 117 | } |
| 119 | 118 | |
| 120 | 119 | /** sets the arrowhead placement (relative offset from edge start) */ |
| 121 | 120 | public void setArrowheadPlacement(double arrowheadPlacement) { |
| 122 | 121 | assert arrowheadPlacement >= 0 && arrowheadPlacement <= 1; |
| 123 | 122 | this.arrowheadPlacement = arrowheadPlacement; |
| 124 | | Main.panel.repaint(); |
| | 123 | invalidate(); |
| 125 | 124 | } |
| 126 | 125 | |
| 127 | 126 | /** |
| … |
… |
public class GraphViewLayer extends Layer implements LayerChangeListener, WayGra
|
| 133 | 132 | if (nodePositioner == null) { |
| 134 | 133 | this.nodePositioner = new NonMovingNodePositioner(); |
| 135 | 134 | } |
| 136 | | Main.panel.repaint(); |
| | 135 | invalidate(); |
| 137 | 136 | } |
| 138 | 137 | |
| 139 | 138 | @Override |
| … |
… |
public class GraphViewLayer extends Layer implements LayerChangeListener, WayGra
|
| 407 | 406 | |
| 408 | 407 | public void update(WayGraph wayGraph) { |
| 409 | 408 | assert wayGraph == this.wayGraph; |
| 410 | | Main.panel.repaint(); |
| 411 | | } |
| 412 | | |
| 413 | | public void activeLayerChange(Layer oldLayer, Layer newLayer) { |
| 414 | | //do nothing |
| 415 | | } |
| 416 | | public void layerAdded(Layer newLayer) { |
| 417 | | //do nothing |
| 418 | | } |
| 419 | | public void layerRemoved(Layer oldLayer) { |
| 420 | | if (oldLayer == this) { |
| 421 | | MapView.removeLayerChangeListener(this); |
| 422 | | } |
| | 409 | invalidate(); |
| 423 | 410 | } |
| 424 | 411 | } |