Changeset 33579 in osm for applications/editors/josm/plugins/print/src
- Timestamp:
- 2017-08-27T22:22:31+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintDialog.java
r33237 r33579 59 59 import org.openstreetmap.gui.jmapviewer.tilesources.AbstractOsmTileSource; 60 60 import org.openstreetmap.josm.Main; 61 import org.openstreetmap.josm.gui.MainApplication; 62 import org.openstreetmap.josm.gui.util.WindowGeometry; 61 63 import org.openstreetmap.josm.tools.GBC; 64 import org.openstreetmap.josm.tools.Logging; 62 65 import org.openstreetmap.josm.tools.Utils; 63 import org.openstreetmap.josm.tools.WindowGeometry;64 66 65 67 /** … … 233 235 printPreview.repaint(); 234 236 } catch (ParseException e) { 235 Main.error(e);237 Logging.error(e); 236 238 } 237 239 } … … 261 263 printPreview.repaint(); 262 264 } catch (ParseException e) { 263 Main.error(e);265 Logging.error(e); 264 266 } 265 267 } … … 343 345 JScrollPane previewPane = new JScrollPane(printPreview, 344 346 JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); 345 previewPane.setPreferredSize(Main .main != null ? Main.map.mapView.getSize() : new Dimension(210, 297));347 previewPane.setPreferredSize(MainApplication.getMap() != null ? MainApplication.getMap().mapView.getSize() : new Dimension(210, 297)); 346 348 add(previewPane, GBC.std(0, 0).span(1, GBC.RELATIVE).fill().weight(5.0, 5.0)); 347 349 … … 479 481 } else if (!ignoredAttributes.contains(a.getName())) { 480 482 // TODO: Add support for DateTimeSyntax, SetOfIntegerSyntax, ResolutionSyntax if needed 481 Main.warn("Print request attribute not supported: "+a.getName() +": "+a.getCategory()+" - "+a.toString());483 Logging.warn("Print request attribute not supported: "+a.getName() +": "+a.getCategory()+" - "+a.toString()); 482 484 } 483 485 if (setting != null) { … … 531 533 return realClass.getConstructor(int.class).newInstance(Integer.parseInt(value)); 532 534 } else { 533 Main.warn("Attribute syntax not supported: "+syntax);535 Logging.warn("Attribute syntax not supported: "+syntax); 534 536 } 535 537 return null; … … 544 546 } 545 547 } catch (PrinterException | ReflectiveOperationException e) { 546 Main.warn(e.getClass().getSimpleName()+": "+e.getMessage());548 Logging.warn(e.getClass().getSimpleName()+": "+e.getMessage()); 547 549 } 548 550 } … … 551 553 attrs.add(unmarshallPrintSetting(setting)); 552 554 } catch (ReflectiveOperationException e) { 553 Main.warn(e.getClass().getSimpleName()+": "+e.getMessage());555 Logging.warn(e.getClass().getSimpleName()+": "+e.getMessage()); 554 556 } 555 557 } -
applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintPlugin.java
r33102 r33579 7 7 8 8 import org.openstreetmap.josm.Main; 9 import org.openstreetmap.josm.gui.MainApplication; 9 10 import org.openstreetmap.josm.gui.MapFrame; 10 11 import org.openstreetmap.josm.plugins.Plugin; … … 41 42 super(info); 42 43 43 JMenu fileMenu = Main .main.menu.fileMenu;44 JMenu fileMenu = MainApplication.getMenu().fileMenu; 44 45 int pos = fileMenu.getItemCount(); 45 46 do { -
applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintPreview.java
r33062 r33579 19 19 import javax.swing.RepaintManager; 20 20 21 import org.openstreetmap.josm. Main;21 import org.openstreetmap.josm.tools.Logging; 22 22 23 23 /** … … 281 281 } catch (PrinterException e) { 282 282 // should never happen since we are not printing 283 Main.error(e);283 Logging.error(e); 284 284 } 285 285 } else { -
applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintableLayerManager.java
r33237 r33579 7 7 import java.util.List; 8 8 9 import org.openstreetmap.josm.Main;10 9 import org.openstreetmap.josm.data.osm.DataSet; 10 import org.openstreetmap.josm.gui.MainApplication; 11 11 import org.openstreetmap.josm.gui.layer.Layer; 12 12 import org.openstreetmap.josm.gui.layer.MainLayerManager; … … 15 15 public class PrintableLayerManager extends MainLayerManager { 16 16 17 private static final MainLayerManager layerManager = Main .getLayerManager();17 private static final MainLayerManager layerManager = MainApplication.getLayerManager(); 18 18 19 19 @Override -
applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintableMapView.java
r33260 r33579 25 25 import org.openstreetmap.josm.data.Bounds; 26 26 import org.openstreetmap.josm.data.SystemOfMeasurement; 27 import org.openstreetmap.josm.gui.MainApplication; 27 28 import org.openstreetmap.josm.gui.MapView; 28 29 import org.openstreetmap.josm.gui.layer.Layer; … … 122 123 if (dim.width != width || dim.height != height) { 123 124 super.setSize(width, height); 124 zoomTo(Main .map.mapView.getRealBounds());125 zoomTo(MainApplication.getMap().mapView.getRealBounds()); 125 126 rezoomToFixedScale(); 126 127 } … … 135 136 if (dim.width != newSize.width || dim.height != newSize.height) { 136 137 super.setSize(newSize); 137 zoomTo(Main .map.mapView.getRealBounds());138 zoomTo(MainApplication.getMap().mapView.getRealBounds()); 138 139 rezoomToFixedScale(); 139 140 }
Note:
See TracChangeset
for help on using the changeset viewer.