Changeset 29854 in osm for applications/editors/josm/plugins/canvec_helper/src/org
- Timestamp:
- 2013-08-21T03:47:16+02:00 (11 years ago)
- 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 23 23 24 24 public class CanVecTile { 25 canvec_layer layer;25 CanvecLayer layer; 26 26 public boolean can_download = false; 27 27 private ArrayList<String> sub_tile_ids = new ArrayList<String>(); … … 39 39 private Bounds bounds; 40 40 public String tileid; 41 public CanVecTile(String tileid, canvec_layer layer) {41 public CanVecTile(String tileid,CanvecLayer layer) { 42 42 String parta,partb,partc,partd; 43 43 parta = tileid.substring(0,3); … … 50 50 real_init(a,partb,c,partd,layer,new ArrayList<String>()); 51 51 } 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) { 53 53 real_init(a,b,c,d,layer,index); 54 54 } 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) { 56 56 this.index = index; 57 57 this.layer = layer; -
applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanvecHelper.java
r29853 r29854 6 6 import org.openstreetmap.josm.Main; 7 7 8 public class canvec_helper extends Plugin { 9 public canvec_helper(PluginInformation info) { 8 public class CanvecHelper extends Plugin { 9 10 public CanvecHelper(PluginInformation info) { 10 11 super(info); 11 System.out.println("in constructor");12 12 Main.main.menu.imagerySubMenu.add(new CanvecHelperAction(this)); 13 13 } 14 @Override 14 15 @Override 15 16 public void mapFrameInitialized(MapFrame old, MapFrame new1) { 16 17 updateLayer(); 17 18 } 19 18 20 private synchronized void updateLayer() { 19 21 } 20 private canvec_layer layer;21 22 } -
applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanvecHelperAction.java
r29805 r29854 5 5 6 6 public 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) { 9 9 super("CanVec Helper","layericon24",null,null,false); 10 10 parent_temp = parent; … … 12 12 @Override 13 13 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); 16 16 Main.main.addLayer(layer); 17 17 } -
applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanvecLayer.java
r29853 r29854 31 31 32 32 // most of the layout was copied from the openstreetbugs plugin to get things started 33 public class canvec_layer extends Layer implements MouseListener {33 public class CanvecLayer extends Layer implements MouseListener { 34 34 private Icon layerIcon = null; 35 35 private int max_zoom = 4; 36 public canvec_helper plugin_self;36 public CanvecHelper plugin_self; 37 37 private ArrayList<CanVecTile> tiles = new ArrayList<CanVecTile>(); 38 38 public ArrayList<CanVecTile> downloadable = new ArrayList<CanVecTile>(); 39 39 public ArrayList<CanVecTile> openable = new ArrayList<CanVecTile>(); 40 40 41 public canvec_layer(String name,canvec_helper self){41 public CanvecLayer(String name,CanvecHelper self){ 42 42 super(name); 43 43 plugin_self = self; … … 71 71 } else System.out.print("bad line '" + line + "'\n"); 72 72 } 73 br.close(); 73 74 CanVecTile tile = new CanVecTile(last_cell,"",0,"",this,list); 74 75 if (tile.isValid()) tiles.add(tile); … … 92 93 } 93 94 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) { 96 97 this.parent = parent; 97 98 } … … 124 125 } 125 126 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) { 128 129 this.layer = layer; 129 130 } … … 155 156 } 156 157 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) { 159 160 this.parent = parent; 160 161 } … … 207 208 tile.paint(g,mv,bounds,max_zoom); 208 209 } 209 long end = System.currentTimeMillis();210 //long end = System.currentTimeMillis(); 210 211 //System.out.println((end-start)+"ms spent"); 211 212 } -
applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/SetMaxZoom.java
r29805 r29854 5 5 6 6 class SetMaxZoom extends AbstractAction { 7 private canvec_layer parent;7 private CanvecLayer parent; 8 8 private int level; 9 public SetMaxZoom( canvec_layer parent,int level) {9 public SetMaxZoom(CanvecLayer parent,int level) { 10 10 super(""+level); 11 11 this.level = level;
Note:
See TracChangeset
for help on using the changeset viewer.