Changeset 32343 in osm


Ignore:
Timestamp:
2016-06-20T23:31:41+02:00 (8 years ago)
Author:
donvip
Message:

fix #13012 - GraphView: Remove deprecated method calls (patch by michael2402)

Location:
applications/editors/josm/plugins/graphview
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/graphview/build.xml

    r31926 r32343  
    22<project name="graphview" default="dist" basedir=".">
    33    <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"/>
    55
    66    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/GraphViewPlugin.java

    r30737 r32343  
    178178
    179179        if (graphViewLayer != null) {
    180             Main.panel.repaint();
     180            graphViewLayer.invalidate();
    181181        }
    182182
  • applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/layer/GraphViewLayer.java

    r26481 r32343  
    4646 * layer for displaying the graph visualization
    4747 */
    48 public class GraphViewLayer extends Layer implements LayerChangeListener, WayGraphObserver {
     48public class GraphViewLayer extends Layer implements WayGraphObserver {
    4949
    5050    private static final int NODE_RADIUS = 5;
     
    9898    public GraphViewLayer() {
    9999        super("Graph view");
    100         MapView.addLayerChangeListener(this);
    101100    }
    102101
     
    115114    public void setColorScheme(ColorScheme colorScheme) {
    116115        this.colorScheme = colorScheme;
    117         Main.panel.repaint();
     116        invalidate();
    118117    }
    119118
     
    122121        assert arrowheadPlacement >= 0 && arrowheadPlacement <= 1;
    123122        this.arrowheadPlacement = arrowheadPlacement;
    124         Main.panel.repaint();
     123        invalidate();
    125124    }
    126125
     
    134133            this.nodePositioner = new NonMovingNodePositioner();
    135134        }
    136         Main.panel.repaint();
     135        invalidate();
    137136    }
    138137
     
    408407    public void update(WayGraph wayGraph) {
    409408        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();
    423410    }
    424411}
Note: See TracChangeset for help on using the changeset viewer.