Ignore:
Timestamp:
2017-08-27T22:22:31+02:00 (7 years ago)
Author:
donvip
Message:

update to JOSM 12678

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

Legend:

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

    r33237 r33579  
    55    <property name="commit.message" value="Added a field to specify the map scale."/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="11905"/>
     7    <property name="plugin.main.version" value="12678"/>
    88
    99    <property name="plugin.author" value="Kai Pastor"/>
  • applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintDialog.java

    r33237 r33579  
    5959import org.openstreetmap.gui.jmapviewer.tilesources.AbstractOsmTileSource;
    6060import org.openstreetmap.josm.Main;
     61import org.openstreetmap.josm.gui.MainApplication;
     62import org.openstreetmap.josm.gui.util.WindowGeometry;
    6163import org.openstreetmap.josm.tools.GBC;
     64import org.openstreetmap.josm.tools.Logging;
    6265import org.openstreetmap.josm.tools.Utils;
    63 import org.openstreetmap.josm.tools.WindowGeometry;
    6466
    6567/**
     
    233235                            printPreview.repaint();
    234236                        } catch (ParseException e) {
    235                             Main.error(e);
     237                            Logging.error(e);
    236238                        }
    237239                    }
     
    261263                            printPreview.repaint();
    262264                        } catch (ParseException e) {
    263                             Main.error(e);
     265                            Logging.error(e);
    264266                        }
    265267                    }
     
    343345        JScrollPane previewPane = new JScrollPane(printPreview,
    344346                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));
    346348        add(previewPane, GBC.std(0, 0).span(1, GBC.RELATIVE).fill().weight(5.0, 5.0));
    347349
     
    479481            } else if (!ignoredAttributes.contains(a.getName())) {
    480482                // 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());
    482484            }
    483485            if (setting != null) {
     
    531533            return realClass.getConstructor(int.class).newInstance(Integer.parseInt(value));
    532534        } else {
    533             Main.warn("Attribute syntax not supported: "+syntax);
     535            Logging.warn("Attribute syntax not supported: "+syntax);
    534536        }
    535537        return null;
     
    544546                }
    545547            } catch (PrinterException | ReflectiveOperationException e) {
    546                 Main.warn(e.getClass().getSimpleName()+": "+e.getMessage());
     548                Logging.warn(e.getClass().getSimpleName()+": "+e.getMessage());
    547549            }
    548550        }
     
    551553                attrs.add(unmarshallPrintSetting(setting));
    552554            } catch (ReflectiveOperationException e) {
    553                 Main.warn(e.getClass().getSimpleName()+": "+e.getMessage());
     555                Logging.warn(e.getClass().getSimpleName()+": "+e.getMessage());
    554556            }
    555557        }
  • applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintPlugin.java

    r33102 r33579  
    77
    88import org.openstreetmap.josm.Main;
     9import org.openstreetmap.josm.gui.MainApplication;
    910import org.openstreetmap.josm.gui.MapFrame;
    1011import org.openstreetmap.josm.plugins.Plugin;
     
    4142        super(info);
    4243
    43         JMenu fileMenu = Main.main.menu.fileMenu;
     44        JMenu fileMenu = MainApplication.getMenu().fileMenu;
    4445        int pos = fileMenu.getItemCount();
    4546        do {
  • applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintPreview.java

    r33062 r33579  
    1919import javax.swing.RepaintManager;
    2020
    21 import org.openstreetmap.josm.Main;
     21import org.openstreetmap.josm.tools.Logging;
    2222
    2323/**
     
    281281            } catch (PrinterException e) {
    282282                // should never happen since we are not printing
    283                 Main.error(e);
     283                Logging.error(e);
    284284            }
    285285        } else {
  • applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintableLayerManager.java

    r33237 r33579  
    77import java.util.List;
    88
    9 import org.openstreetmap.josm.Main;
    109import org.openstreetmap.josm.data.osm.DataSet;
     10import org.openstreetmap.josm.gui.MainApplication;
    1111import org.openstreetmap.josm.gui.layer.Layer;
    1212import org.openstreetmap.josm.gui.layer.MainLayerManager;
     
    1515public class PrintableLayerManager extends MainLayerManager {
    1616
    17     private static final MainLayerManager layerManager = Main.getLayerManager();
     17    private static final MainLayerManager layerManager = MainApplication.getLayerManager();
    1818
    1919    @Override
  • applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintableMapView.java

    r33260 r33579  
    2525import org.openstreetmap.josm.data.Bounds;
    2626import org.openstreetmap.josm.data.SystemOfMeasurement;
     27import org.openstreetmap.josm.gui.MainApplication;
    2728import org.openstreetmap.josm.gui.MapView;
    2829import org.openstreetmap.josm.gui.layer.Layer;
     
    122123        if (dim.width != width || dim.height != height) {
    123124            super.setSize(width, height);
    124             zoomTo(Main.map.mapView.getRealBounds());
     125            zoomTo(MainApplication.getMap().mapView.getRealBounds());
    125126            rezoomToFixedScale();
    126127        }
     
    135136        if (dim.width != newSize.width || dim.height != newSize.height) {
    136137            super.setSize(newSize);
    137             zoomTo(Main.map.mapView.getRealBounds());
     138            zoomTo(MainApplication.getMap().mapView.getRealBounds());
    138139            rezoomToFixedScale();
    139140        }
Note: See TracChangeset for help on using the changeset viewer.