Ignore:
Timestamp:
2013-08-21T03:47:16+02:00 (11 years ago)
Author:
donvip
Message:

[josm_plugins] fix #8987 - bump min JOSM version of nearly all plugins to r6162 + code update/cleanup, fix warnings

Location:
applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper
Files:
3 edited
2 moved

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanVecTile.java

    r27950 r29854  
    2323
    2424public class CanVecTile {
    25         canvec_layer layer;
     25        CanvecLayer layer;
    2626        public boolean can_download = false;
    2727        private ArrayList<String> sub_tile_ids = new ArrayList<String>();
     
    3939        private Bounds bounds;
    4040        public String tileid;
    41         public CanVecTile(String tileid,canvec_layer layer) {
     41        public CanVecTile(String tileid,CanvecLayer layer) {
    4242                String parta,partb,partc,partd;
    4343                parta = tileid.substring(0,3);
     
    5050                real_init(a,partb,c,partd,layer,new ArrayList<String>());
    5151        }
    52         public CanVecTile(int a,String b,int c,String d,canvec_layer layer,ArrayList<String> index) {
     52        public CanVecTile(int a,String b,int c,String d,CanvecLayer layer,ArrayList<String> index) {
    5353                real_init(a,b,c,d,layer,index);
    5454        }
    55         public void real_init(int a,String b,int c,String d,canvec_layer layer, ArrayList<String> index) {
     55        public void real_init(int a,String b,int c,String d,CanvecLayer layer, ArrayList<String> index) {
    5656                this.index = index;
    5757                this.layer = layer;
  • applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanvecHelper.java

    r29853 r29854  
    66import org.openstreetmap.josm.Main;
    77
    8 public class canvec_helper extends Plugin {
    9         public canvec_helper(PluginInformation info) {
     8public class CanvecHelper extends Plugin {
     9   
     10        public CanvecHelper(PluginInformation info) {
    1011                super(info);
    11                 System.out.println("in constructor");
    1212                Main.main.menu.imagerySubMenu.add(new CanvecHelperAction(this));
    1313        }
    14         @Override
     14       
     15    @Override
    1516        public void mapFrameInitialized(MapFrame old, MapFrame new1) {
    1617                updateLayer();
    1718        }
     19   
    1820        private synchronized void updateLayer() {
    1921        }
    20         private canvec_layer layer;
    2122}
  • applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanvecHelperAction.java

    r29805 r29854  
    55
    66public class CanvecHelperAction extends JosmAction {
    7         private canvec_helper parent_temp;
    8         public CanvecHelperAction(canvec_helper parent) {
     7        private CanvecHelper parent_temp;
     8        public CanvecHelperAction(CanvecHelper parent) {
    99                super("CanVec Helper","layericon24",null,null,false);
    1010                parent_temp = parent;
     
    1212        @Override
    1313        public void actionPerformed(java.awt.event.ActionEvent action) {
    14                 canvec_layer layer;
    15                 layer = new canvec_layer("canvec tile helper",parent_temp);
     14                CanvecLayer layer;
     15                layer = new CanvecLayer("canvec tile helper",parent_temp);
    1616                Main.main.addLayer(layer);
    1717        }
  • applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanvecLayer.java

    r29853 r29854  
    3131
    3232// most of the layout was copied from the openstreetbugs plugin to get things started
    33 public class canvec_layer extends Layer implements MouseListener {
     33public class CanvecLayer extends Layer implements MouseListener {
    3434        private Icon layerIcon = null;
    3535        private int max_zoom = 4;
    36         public canvec_helper plugin_self;
     36        public CanvecHelper plugin_self;
    3737        private ArrayList<CanVecTile> tiles = new ArrayList<CanVecTile>();
    3838        public ArrayList<CanVecTile> downloadable = new ArrayList<CanVecTile>();
    3939        public ArrayList<CanVecTile> openable = new ArrayList<CanVecTile>();
    4040
    41         public canvec_layer(String name,canvec_helper self){
     41        public CanvecLayer(String name,CanvecHelper self){
    4242                super(name);
    4343                plugin_self = self;
     
    7171                                } else System.out.print("bad line '" + line + "'\n");
    7272                        }
     73                        br.close();
    7374                        CanVecTile tile = new CanVecTile(last_cell,"",0,"",this,list);
    7475                        if (tile.isValid()) tiles.add(tile);
     
    9293        }
    9394        public class MaxZoomAction extends AbstractAction implements LayerAction {
    94                 private canvec_layer parent;
    95                 public MaxZoomAction(canvec_layer parent) {
     95                private CanvecLayer parent;
     96                public MaxZoomAction(CanvecLayer parent) {
    9697                        this.parent = parent;
    9798                }
     
    124125        }
    125126        private class OpenOsmAction extends AbstractAction implements LayerAction {
    126                 private canvec_layer layer;
    127                 public OpenOsmAction(canvec_layer layer) {
     127                private CanvecLayer layer;
     128                public OpenOsmAction(CanvecLayer layer) {
    128129                        this.layer = layer;
    129130                }
     
    155156        }
    156157        private class DownloadCanvecAction extends AbstractAction implements LayerAction {
    157                 private canvec_layer parent;
    158                 public DownloadCanvecAction(canvec_layer parent) {
     158                private CanvecLayer parent;
     159                public DownloadCanvecAction(CanvecLayer parent) {
    159160                        this.parent = parent;
    160161                }
     
    207208                        tile.paint(g,mv,bounds,max_zoom);
    208209                }
    209                 long end = System.currentTimeMillis();
     210                //long end = System.currentTimeMillis();
    210211                //System.out.println((end-start)+"ms spent");
    211212        }
  • applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/SetMaxZoom.java

    r29805 r29854  
    55
    66class SetMaxZoom extends AbstractAction {
    7         private canvec_layer parent;
     7        private CanvecLayer parent;
    88        private int level;
    9         public SetMaxZoom(canvec_layer parent,int level) {
     9        public SetMaxZoom(CanvecLayer parent,int level) {
    1010                super(""+level);
    1111                this.level = level;
Note: See TracChangeset for help on using the changeset viewer.