Ignore:
Timestamp:
2009-11-14T19:27:50+01:00 (15 years ago)
Author:
jttt
Message:

Updated to new MapViewPaintable.paint arguments

Location:
applications/editors/josm/plugins/validator
Files:
6 edited

Legend:

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

    r18524 r18593  
    2727        -->
    2828        <property name="commit.message" value="Updated build.xml" />           
    29         <property name="plugin.main.version" value="2414" />
     29        <property name="plugin.main.version" value="2450" />
    3030               
    3131               
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ErrorLayer.java

    r17175 r18593  
    44
    55import java.awt.Component;
    6 import java.awt.Graphics;
     6import java.awt.Graphics2D;
    77import java.util.Enumeration;
    88import java.util.List;
     
    1515import org.openstreetmap.josm.Main;
    1616import org.openstreetmap.josm.actions.RenameLayerAction;
     17import org.openstreetmap.josm.data.Bounds;
    1718import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
    1819import org.openstreetmap.josm.gui.MapView;
     
    2728/**
    2829 * A layer showing error messages.
    29  * 
     30 *
    3031 * @author frsantos
    3132 */
     
    5455    @SuppressWarnings("unchecked")
    5556    @Override
    56     public void paint(final Graphics g, final MapView mv) {
     57    public void paint(final Graphics2D g, final MapView mv, Bounds bounds) {
    5758        DefaultMutableTreeNode root = plugin.validationDialog.tree.getRoot();
    5859        if (root == null || root.getChildCount() == 0)
     
    114115    public Component[] getMenuEntries() {
    115116        return new Component[] { new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this)),
    116                 new JMenuItem(LayerListDialog.getInstance().createDeleteLayerAction(this)), 
     117                new JMenuItem(LayerListDialog.getInstance().createDeleteLayerAction(this)),
    117118                new JSeparator(),
    118119                new JMenuItem(new RenameLayerAction(null, this)), new JSeparator(),
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/GridLayer.java

    r17351 r18593  
    44import java.awt.Component;
    55import java.awt.Graphics;
     6import java.awt.Graphics2D;
    67import java.awt.Point;
    78import java.awt.geom.Point2D;
     
    1314import org.openstreetmap.josm.Main;
    1415import org.openstreetmap.josm.actions.RenameLayerAction;
     16import org.openstreetmap.josm.data.Bounds;
    1517import org.openstreetmap.josm.data.coor.EastNorth;
    1618import org.openstreetmap.josm.data.osm.Node;
     
    5456     */
    5557    @Override
    56     public void paint(final Graphics g, final MapView mv)
     58    public void paint(final Graphics2D g, final MapView mv, Bounds bounds)
    5759    {
    5860        if( !Main.pref.hasKey(PreferenceEditor.PREF_DEBUG + ".grid") )
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/Test.java

    r18514 r18593  
    11package org.openstreetmap.josm.plugins.validator;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.util.ArrayList;
     
    810import javax.swing.JPanel;
    911
    10 import org.openstreetmap.josm.Main;
    1112import org.openstreetmap.josm.command.Command;
    1213import org.openstreetmap.josm.data.osm.BackreferencedDataSet;
     
    1920import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    2021import org.openstreetmap.josm.tools.GBC;
    21 import static org.openstreetmap.josm.tools.I18n.tr;
    2222
    2323/**
     
    9595
    9696    /**
    97      * Start the test using a given progress monitor 
    98      * 
    99      * @param progressMonitor  the progress monitor 
     97     * Start the test using a given progress monitor
     98     *
     99     * @param progressMonitor  the progress monitor
    100100     */
    101101    public void startTest(ProgressMonitor progressMonitor) {
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/DuplicateNode.java

    r18514 r18593  
    55import java.awt.geom.Area;
    66import java.util.Collection;
     7import java.util.LinkedHashSet;
    78import java.util.LinkedList;
    8 import java.util.LinkedHashSet;
    99import java.util.List;
    1010import java.util.Map;
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UnconnectedWays.java

    r18425 r18593  
    1919import org.openstreetmap.josm.data.coor.EastNorth;
    2020import org.openstreetmap.josm.data.coor.LatLon;
     21import org.openstreetmap.josm.data.osm.BBox;
    2122import org.openstreetmap.josm.data.osm.DataSet;
    2223import org.openstreetmap.josm.data.osm.Node;
     
    2425import org.openstreetmap.josm.data.osm.QuadBuckets;
    2526import org.openstreetmap.josm.data.osm.Way;
    26 import org.openstreetmap.josm.data.osm.QuadBuckets.BBox;
    2727import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    2828import org.openstreetmap.josm.plugins.validator.PreferenceEditor;
     
    7575        this.ds = Main.main.getCurrentDataSet();
    7676        this.ds_area = ds.getDataSourceArea();
    77         this.ds.reindexAll();
    78         }
     77    }
    7978
    8079    @Override
     
    196195    private class MyWaySegment
    197196    {
    198         private Line2D line;
    199         public Way w;
    200         public boolean isAbandoned = false;
    201         public boolean isBoundary = false;
    202         public boolean highway;
    203         private double len;
     197        private final Line2D line;
     198        public final Way w;
     199        public final boolean isAbandoned;
     200        public final boolean isBoundary;
     201        public final boolean highway;
     202        private final double len;
    204203        private Set<Node> nearbyNodeCache;
    205204        double nearbyNodeCacheDist = -1.0;
    206         Node n1;
    207         Node n2;
     205        final Node n1;
     206        final Node n2;
    208207
    209208        public MyWaySegment(Way w, Node n1, Node n2)
     
    368367    private void addNode(Node n, Set<Node> s)
    369368    {
    370         Boolean m = middlenodes.contains(n);
    371         Boolean e = endnodes.contains(n);
    372         Boolean eh = endnodes_highway.contains(n);
    373         Boolean o = othernodes.contains(n);
     369        boolean m = middlenodes.contains(n);
     370        boolean e = endnodes.contains(n);
     371        boolean eh = endnodes_highway.contains(n);
     372        boolean o = othernodes.contains(n);
    374373        if(!m && !e && !o && !eh)
    375374            s.add(n);
Note: See TracChangeset for help on using the changeset viewer.