Changeset 30815 in osm for applications/editors/josm/plugins/OsmInspectorPlugin/src
- Timestamp:
- 2014-11-26T01:40:41+01:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/GeoFabrikWFSClient.java
r30737 r30815 51 51 FeatureSource<SimpleFeatureType, SimpleFeature> source = data 52 52 .getFeatureSource(typeName); 53 System.out.println("Source Metadata Bounds:" + source.getBounds());54 System.out.println("Source schema: " + source.getSchema());53 Main.info("Source Metadata Bounds:" + source.getBounds()); 54 Main.info("Source schema: " + source.getSchema()); 55 55 56 56 progressMonitor.setProgress(40); … … 73 73 ReferencedEnvelope bboxRef = new ReferencedEnvelope(minLon, maxLon, 74 74 minLat, maxLat, targetCRS); 75 System.out.println("Reference Bounds:" + bboxRef);75 Main.info("Reference Bounds:" + bboxRef); 76 76 77 77 progressMonitor.setProgress(50); … … 144 144 // bounds.include(feature.getBounds()); 145 145 // } 146 // System.out.println("Calculated Bounds:" + bounds);146 // Main.info("Calculated Bounds:" + bounds); 147 147 // } finally { 148 148 // features.close(iterator); -
applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/ImportOsmInspectorBugsAction.java
r29854 r30815 36 36 "Querying WFS Geofabrik", "Dowloading features", 0, 100); 37 37 38 System.out.println("enabled event...");39 38 try { 40 39 Bounds bounds = Main.map.mapView 41 40 .getLatLonBounds(Main.map.mapView.getBounds()); 42 41 43 System.out.println("OSMI View bounds" + bounds);42 Main.info("OSMI View bounds" + bounds); 44 43 45 44 monitor.setProgress(10); … … 67 66 } 68 67 } 69 } 70 if (!isEnabled()) { 71 System.out.println("Osm Inspector Action not enanbled"); 72 68 } else { 69 Main.warn("Osm Inspector Action not enabled"); 73 70 } 74 71 } -
applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/OsmInspectorLayer.java
r30737 r30815 322 322 private enum GeomType { 323 323 POINT, LINE, POLYGON 324 } ;324 } 325 325 326 326 private static final Color SELECTED_COLOUR = Color.ORANGE; … … 366 366 setGeometry(selectGeomType, typeName); 367 367 368 System.out.println("Osm Inspector Features size: " 369 + features.size()); 368 Main.info("Osm Inspector Features size: " + features.size()); 370 369 Style style = createDefaultStyle(idx, selectedFeatures); 371 370 … … 424 423 setGeometry(selectGeomType, typeName); 425 424 426 System.out.println("Osm Inspector Features size: " 427 + features.size()); 425 Main.info("Osm Inspector Features size: " + features.size()); 428 426 429 427 OSMIFeatureTracker tracker = arrFeatures.get(idx - layerOffset); 430 428 tracker.mergeFeatures(features); 431 429 432 FeatureIterator<SimpleFeature> it = tracker.getFeatures() 433 .features(); 430 FeatureIterator<SimpleFeature> it = tracker.getFeatures().features(); 434 431 435 432 while (it.hasNext()) { … … 516 513 517 514 private void setGeometry(ArrayList<GeomType> selectedTypes, String typename) { 518 System.out.println("Passed type is" + typename);515 Main.info("Passed type is" + typename); 519 516 if (typename.compareTo("duplicate_ways") == 0) { 520 517 geometryType = GeomType.LINE; … … 619 616 selectedFeatures = tempfs.getFeatures(filter); 620 617 621 FeatureIterator<SimpleFeature> iter = selectedFeatures 622 .features(); 618 FeatureIterator<SimpleFeature> iter = selectedFeatures.features(); 623 619 Set<FeatureId> IDs = new HashSet<>(); 624 620 625 System.out.println("Selected features " 626 + selectedFeatures.size()); 621 Main.info("Selected features " + selectedFeatures.size()); 627 622 628 623 while (iter.hasNext()) { -
applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/OsmInspectorPlugin.java
r29854 r30815 6 6 import java.awt.event.MouseEvent; 7 7 import java.awt.event.MouseListener; 8 import java.util.List;9 8 10 9 import org.openstreetmap.josm.Main; … … 21 20 import org.openstreetmap.josm.gui.download.DownloadSelection; 22 21 import org.openstreetmap.josm.gui.layer.Layer; 23 import org.openstreetmap.josm.gui.preferences.PreferenceSetting;24 22 import org.openstreetmap.josm.plugins.Plugin; 25 23 import org.openstreetmap.josm.plugins.PluginInformation; … … 51 49 */ 52 50 private void initializePlugin() { 53 System.out.println("Initialized Plugin...");54 51 Shortcut.registerShortcut("OsmInspector", tr("Toggle: {0}", tr("Open OsmInspector")), 55 52 KeyEvent.VK_1, Shortcut.ALT_SHIFT); … … 66 63 @Override 67 64 public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) { 68 System.out.println("In map frame initialized");69 65 Main.toolbar.register( new ImportOsmInspectorBugsAction( this ) ); 70 66 if (newFrame == null) { 71 67 /* if new MapFrame is null, remove listener */ 72 System.out.println("newFrame is null");73 68 MapView.removeLayerChangeListener(this); 74 69 NavigatableComponent.removeZoomChangeListener(this); … … 88 83 userIdentityManager.getUserName()); 89 84 Main.toolbar.control.add( new ImportOsmInspectorBugsAction( this ) ); 90 System.out.println("Action added to control....");91 85 } 92 86 } 93 }94 95 @Override96 public PreferenceSetting getPreferenceSetting() {97 // TODO Auto-generated method stub98 return super.getPreferenceSetting();99 }100 101 @Override102 public void addDownloadSelection(List<DownloadSelection> list) {103 // TODO Auto-generated method stub104 super.addDownloadSelection(list);105 87 } 106 88 -
applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/gui/OsmInspectorBugInfoDialog.java
r30701 r30815 24 24 ListSelectionListener, LayerChangeListener, MouseListener { 25 25 26 //private OsmInspectorLayer layer;27 26 private JTextPane bugTextArea; 28 27 … … 48 47 true // default is "show dialog" 49 48 ); 50 //this.layer = layer;51 49 buildContentPanel(); 52 50 } 53 51 54 52 public void updateDialog(OsmInspectorLayer l) { 55 //this.layer = l;56 53 } 57 54 … … 60 57 } 61 58 62 /*@Override63 public void showNotify() {64 super.showNotify();65 }*/66 67 59 @Override 68 60 public void hideNotify() { … … 94 86 @Override 95 87 public void activeLayerChange(Layer oldLayer, Layer newLayer) { 96 /*if(newLayer instanceof OsmInspectorLayer) {97 this.layer = (OsmInspectorLayer) newLayer;98 }*/99 88 } 100 89 … … 109 98 @Override 110 99 public void valueChanged(ListSelectionEvent e) { 111 //System.out.println(e.getFirstIndex());112 100 } 113 101 } -
applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/gui/OsmInspectorDialog.java
r30532 r30815 72 72 BugInfo next = layer.getOsmiIndex().getItemPointedByNext(); 73 73 layer.setOsmiIndex((e.getFirstIndex() + 1) % layer.getOsmiBugInfo().size()); 74 System.out.println(next);75 74 Geometry geom = next.getGeom(); 76 75 Point centroid = geom.getCentroid(); … … 103 102 prevButton.createArrow(new ActionListener() { 104 103 public void actionPerformed(ActionEvent e) { 105 System.out.println(e);106 104 } 107 105 }); … … 177 175 layer.getOsmiIndex().next(); 178 176 BugInfo next = layer.getOsmiIndex().getItemPointedByNext(); 179 System.out.println(next);180 177 Geometry geom = next.getGeom(); 181 178 Point centroid = geom.getCentroid(); … … 213 210 layer.getOsmiIndex().prev(); 214 211 BugInfo prev = layer.getOsmiIndex().getItemPointedByPrev(); 215 System.out.println(prev);216 212 Geometry geom = prev.getGeom(); 217 213 Point centroid = geom.getCentroid();
Note:
See TracChangeset
for help on using the changeset viewer.