Ignore:
Timestamp:
2010-09-15T18:54:18+02:00 (14 years ago)
Author:
stoecker
Message:

remove tabs

Location:
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java

    r21191 r23190  
    2525
    2626public class CacheControl implements Runnable {
    27    
     27
    2828    public static final String cLambertCC9Z = "CC";
    2929
     
    5555        return ret;
    5656    }
    57    
     57
    5858    public CacheControl(WMSLayer wmsLayer) {
    5959        cacheEnabled = Main.pref.getBoolean("cadastrewms.enableCaching", true);
     
    110110                    int reply = (Integer)pane.getValue();
    111111                    // till here
    112    
     112
    113113                    if (reply == JOptionPane.OK_OPTION && loadCache(file, wmsLayer.getLambertZone())) {
    114114                        return true;
     
    136136        }
    137137    }
    138    
     138
    139139    private void delete(File file) {
    140140        System.out.println("Delete file "+file);
     
    215215        }
    216216    }
    217    
     217
    218218    private String WMSFileExtension() {
    219219        String ext = String.valueOf((wmsLayer.getLambertZone() + 1));
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreGrabber.java

    r20390 r23190  
    5252        }
    5353    }
    54    
     54
    5555    public GeorefImage grabParcels(WMSLayer wmsLayer, EastNorth lambertMin, EastNorth lambertMax) throws IOException, OsmTransferException {
    5656        try {
     
    6363        }
    6464    }
    65    
     65
    6666    private URL getURLRaster(WMSLayer wmsLayer, EastNorth lambertMin, EastNorth lambertMax) throws MalformedURLException {
    6767        // GET /scpc/wms?version=1.1&request=GetMap&layers=CDIF:PMC@QH4480001701&format=image/png&bbox=-1186,0,13555,8830&width=576&height=345&exception=application/vnd.ogc.se_inimage&styles= HTTP/1.1
     
    8585            EastNorth lambertMin, EastNorth lambertMax) throws MalformedURLException {
    8686        String str = new String(wmsInterface.baseURL+"/scpc/wms?version=1.1&request=GetMap");
    87         str += "&layers="+ layers; 
     87        str += "&layers="+ layers;
    8888        str += "&format=image/png";
    8989        //str += "&format=image/jpeg";
     
    100100
    101101    private URL getURLVector(EastNorth lambertMin, EastNorth lambertMax) throws MalformedURLException {
    102         return buildURLVector(CadastrePlugin.grabLayers, CadastrePlugin.grabStyles, 
    103                 CadastrePlugin.imageWidth, CadastrePlugin.imageHeight, 
     102        return buildURLVector(CadastrePlugin.grabLayers, CadastrePlugin.grabStyles,
     103                CadastrePlugin.imageWidth, CadastrePlugin.imageHeight,
    104104                lambertMin, lambertMax);
    105105    }
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java

    r22387 r23190  
    5353    final String cOptionListEnd = "</option>";
    5454    final String cBBoxCommunStart = "new GeoBox(";
    55     final String cBBoxCommunEnd = ")";   
     55    final String cBBoxCommunEnd = ")";
    5656
    5757    final String cInterfaceVector = "afficherCarteCommune.do";
     
    6262    final String cImageNameStart = ">Feuille ";
    6363    final String cTAImageNameStart = "Tableau d'assemblage <strong>";
    64    
     64
    6565    final static long cCookieExpiration = 30 * 60 * 1000; // 30 minutes expressed in milliseconds
    6666
     
    9797
    9898    /**
    99      * 
     99     *
    100100     * @return true if a cookie is delivered by WMS and false is WMS is not opening a client session
    101101     *         (too many clients or in maintenance)
     
    141141        cookie = null;
    142142    }
    143    
     143
    144144    public boolean isCookieExpired() {
    145145        long now = new Date().getTime();
     
    165165        urlConn.setRequestProperty("Cookie", this.cookie);
    166166    }
    167    
     167
    168168    private void getInterface(WMSLayer wmsLayer) throws IOException, DuplicateLayerException {
    169169        // first attempt : search for given name without codeCommune
     
    379379        return lines;
    380380    }
    381    
     381
    382382    private void parseFeuillesList(String input) {
    383383        listOfFeuilles.clear();
     
    402402        }
    403403    }
    404    
     404
    405405    private String selectMunicipalityDialog(WMSLayer wmsLayer) {
    406406        JPanel p = new JPanel(new GridBagLayout());
     
    455455     * and store it in given wmsLayer
    456456     * In case of raster image, we also check in the same http request if the image is already georeferenced
    457      * and store the result in the wmsLayer as well. 
     457     * and store the result in the wmsLayer as well.
    458458     * @param wmsLayer the WMSLayer where the commune data and images are stored
    459459     * @throws IOException
     
    502502        }
    503503    }
    504    
     504
    505505    private void parseGeoreferences(WMSLayer wmsLayer, String input) {
    506506        if (input.lastIndexOf(cBBoxCommunStart) != -1) {
     
    537537        }
    538538    }
    539    
     539
    540540    private double tryParseDouble(String str) {
    541541        try {
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java

    r22850 r23190  
    9696 *                 - proper WMS layer cleanup at destruction (workaround for memory leak)
    9797 *                 - new cache format (v3) storing original image and cropped image bbox + angle
    98  *                 - new cache format (v4) storing original image size for later rotation 
     98 *                 - new cache format (v4) storing original image size for later rotation
    9999 *                 - cache files read compatible with previous formats
    100100 *                 - raster image rotation issues fixed, now using shift+ctrl key instead of ctrl
     
    104104 *                 - improved download cancellation
    105105 *                 - from Erik Amzallag:
    106  *                 -     possibility to modify the auto-sourcing text just before upload 
     106 *                 -     possibility to modify the auto-sourcing text just before upload
    107107 *                 - from Clément Ménier:
    108108 *                 -     new option allowing an auto-selection of the first cadastre layer for grab
     
    112112 *                 - download cancellation improved
    113113 *                 - last deployment for Java1.5 compatibility
    114  * 2.0 xx-xxx-xxxx - update projection for "La Reunion" departement to RGR92, UTM40S. 
     114 * 2.0 xx-xxx-xxxx - update projection for "La Reunion" departement to RGR92, UTM40S.
    115115 *                 - add 'departement' as option in the municipality selection
    116116 *                 - fixed bug in cache directory size control (and disabled by default)
     
    145145
    146146    public static int imageWidth, imageHeight;
    147    
     147
    148148    public static String grabLayers, grabStyles = null;
    149149
     
    156156     */
    157157    public CadastrePlugin(PluginInformation info) throws Exception {
    158         super(info);
     158        super(info);
    159159        System.out.println("Pluging cadastre-fr v"+VERSION+" started...");
    160160        if (Main.pref.get("cadastrewms.cacheDir").equals(""))
     
    218218
    219219    public static void refreshConfiguration() {
    220         source = checkSourceMillesime(); 
     220        source = checkSourceMillesime();
    221221        autoSourcing = Main.pref.getBoolean("cadastrewms.autosourcing", true);
    222222        alterColors = Main.pref.getBoolean("cadastrewms.alterColors");
     
    234234        } else if (currentResolution.equals("medium")){
    235235            imageWidth = 800; imageHeight = 600;
    236         } else { 
     236        } else {
    237237            imageWidth = 600; imageHeight = 400;
    238238        }
    239239        refreshLayersURL();
    240        
     240
    241241        // overwrite F11 shortcut used from the beginning by this plugin and recently used
    242242        // for full-screen switch in JOSM core
     
    268268        refreshMenu();
    269269    }
    270    
     270
    271271    private static void refreshLayersURL() {
    272272        grabLayers = "";
     
    346346        }
    347347    }
    348    
     348
    349349    public static boolean isCadastreProjection() {
    350350        return Main.proj.toString().equals(new Lambert().toString())
     
    360360
    361361    // See OptionPaneUtil
    362     // FIXME: this is a temporary solution. 
     362    // FIXME: this is a temporary solution.
    363363    public static void prepareDialog(JDialog dialog) {
    364364        if (Main.pref.getBoolean("window-handling.option-pane-always-on-top", true)) {
     
    373373        dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
    374374    }
    375    
     375
    376376    /**
    377377     * Adds the WMSLayer following this rule:<br/>
     
    393393            Main.main.addLayer(wmsLayer);
    394394    }
    395    
     395
    396396    private static String checkSourceMillesime() {
    397397        java.util.Calendar calendar = java.util.Calendar.getInstance();
     
    411411        return src;
    412412    }
    413    
     413
    414414}
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePreferenceSetting.java

    r22387 r23190  
    4040
    4141    private JCheckBox disableImageCropping = new JCheckBox(tr("Disable image cropping during georeferencing."));
    42    
     42
    4343    private JCheckBox enableTableauAssemblage = new JCheckBox(tr("Use \"Tableau d''assemblage\""));
    44    
     44
    4545    private JCheckBox autoFirstLayer = new JCheckBox(tr("Select first WMS layer in list."));
    46    
     46
    4747    private JCheckBox dontUseRelation = new JCheckBox(tr("Don't use relation for addresses (but \"addr:street\" on elements)."));
    48    
     48
    4949    private JRadioButton grabMultiplier1 = new JRadioButton("", true);
    5050
     
    5454
    5555    private JRadioButton grabMultiplier4 = new JRadioButton("", true);
    56    
     56
    5757    private JRadioButton crosspiece1 = new JRadioButton("off");
    58    
     58
    5959    private JRadioButton crosspiece2 = new JRadioButton("25m");
    6060
     
    8787    JLabel jLabelCacheSize = new JLabel(tr("Max. cache size (in MB)"));
    8888    private JTextField cacheSize = new JTextField(20);
    89    
     89
    9090    static final String DEFAULT_RASTER_DIVIDER = "5";
    9191    private JTextField rasterDivider = new JTextField(10);
    9292
    9393    static final int DEFAULT_CROSSPIECES = 0;
    94    
     94
    9595    public void addGui(final PreferenceTabbedPane gui) {
    9696
     
    101101                + "before any upload of data created by this plugin.");
    102102        JPanel cadastrewmsMast = gui.createPreferenceTab("cadastrewms.gif", I18n.tr("French cadastre WMS"), description);
    103        
     103
    104104        JPanel cadastrewms = new JPanel(new GridBagLayout());
    105105        cadastrewms.setBorder(BorderFactory.createEmptyBorder(0,0,0,0));
     
    177177        cadastrewms.add(grabRes2, GBC.std().insets(5, 0, 5, 0));
    178178        cadastrewms.add(grabRes3, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 5, 0, 5));
    179        
     179
    180180        // option to select image zooming interpolation method
    181181        JLabel jLabelImageZoomInterpolation = new JLabel(tr("Image filter interpolation:"));
     
    185185        imageInterpolationMethod.addItem(tr("Bicubic (slow)"));
    186186        String savedImageInterpolationMethod = Main.pref.get("cadastrewms.imageInterpolation", "standard");
    187         if (savedImageInterpolationMethod.equals("bilinear")) 
     187        if (savedImageInterpolationMethod.equals("bilinear"))
    188188            imageInterpolationMethod.setSelectedIndex(1);
    189         else if (savedImageInterpolationMethod.equals("bicubic")) 
     189        else if (savedImageInterpolationMethod.equals("bicubic"))
    190190            imageInterpolationMethod.setSelectedIndex(2);
    191191        else
     
    195195        // separator
    196196        cadastrewms.add(new JSeparator(SwingConstants.HORIZONTAL), GBC.eol().fill(GBC.HORIZONTAL));
    197        
     197
    198198        // the vectorized images multiplier
    199199        JLabel jLabelScale = new JLabel(tr("Vector images grab multiplier:"));
     
    275275        layerCommune.setToolTipText(tr("Municipality administrative borders."));
    276276        cadastrewms.add(layerCommune, GBC.eop().insets(5, 0, 5, 0));
    277        
     277
    278278        // separator
    279279        cadastrewms.add(new JSeparator(SwingConstants.HORIZONTAL), GBC.eol().fill(GBC.HORIZONTAL));
     
    335335        // separator
    336336        cadastrewms.add(new JSeparator(SwingConstants.HORIZONTAL), GBC.eol().fill(GBC.HORIZONTAL));
    337        
     337
    338338        // option to select the first WMS layer
    339339        autoFirstLayer.setSelected(Main.pref.getBoolean("cadastrewms.autoFirstLayer", false));
     
    348348        dontUseRelation.setToolTipText(tr("Enable this to use the tag \"add:street\" on nodes."));
    349349        cadastrewms.add(dontUseRelation, GBC.eop().insets(0, 0, 0, 0));
    350        
     350
    351351        // end of dialog, scroll bar
    352352        cadastrewms.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.VERTICAL));
     
    374374        else if (imageInterpolationMethod.getSelectedIndex() == 1)
    375375            Main.pref.put("cadastrewms.imageInterpolation", "bilinear");
    376         else 
     376        else
    377377            Main.pref.put("cadastrewms.imageInterpolation", "standard");
    378378        if (grabMultiplier1.isSelected())
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CheckSourceUploadHook.java

    r19149 r23190  
    3838     * Add the tag "source" if it doesn't exist for all new Nodes and Ways before uploading
    3939     */
    40     public boolean checkUpload(APIDataSet apiDataSet) 
     40    public boolean checkUpload(APIDataSet apiDataSet)
    4141    {
    4242        if (CadastrePlugin.autoSourcing && CadastrePlugin.pluginUsed && !apiDataSet.getPrimitivesToAdd().isEmpty()) {
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGBuilding.java

    r20412 r23190  
    5454    @Override
    5555    public void realRun() throws IOException, OsmTransferException {
    56         progressMonitor.indeterminateSubTask(tr("Contacting WMS Server..."));
     56        progressMonitor.indeterminateSubTask(tr("Contacting WMS Server..."));
    5757        errorMessage = null;
    5858        try {
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGTask.java

    r20412 r23190  
    5757    @Override
    5858    public void realRun() throws IOException, OsmTransferException {
    59         progressMonitor.indeterminateSubTask(tr("Contacting WMS Server..."));
     59        progressMonitor.indeterminateSubTask(tr("Contacting WMS Server..."));
    6060        errorMessage = null;
    6161        try {
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadWMSVectorImage.java

    r20412 r23190  
    1616
    1717    private WMSLayer wmsLayer;
    18     private Bounds bounds;   
    19     private CadastreGrabber grabber = CadastrePlugin.cadastreGrabber;   
     18    private Bounds bounds;
     19    private CadastreGrabber grabber = CadastrePlugin.cadastreGrabber;
    2020    private static String errorMessage;
    2121
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/EastNorthBound.java

    r18544 r23190  
    3131        return enb;
    3232    }
    33    
     33
    3434    public Bounds toBounds() {
    3535        return new Bounds(Main.proj.eastNorth2latlon(min), Main.proj.eastNorth2latlon(max));
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/GeorefImage.java

    r22230 r23190  
    3030    public EastNorth max;
    3131    // bbox of the georeferenced original image (raster only) (inclined if rotated and before cropping)
    32     // P[0] is bottom,left then next are clockwise. 
     32    // P[0] is bottom,left then next are clockwise.
    3333    public EastNorth[] orgRaster = new EastNorth[4];
    34     // bbox of the georeferenced original image (raster only) after cropping 
     34    // bbox of the georeferenced original image (raster only) after cropping
    3535    public EastNorth[] orgCroppedRaster = new EastNorth[4];
    3636    // angle with georeferenced original image after rotation (raster images only)(in radian)
     
    4646    public GeorefImage(BufferedImage img, EastNorth min, EastNorth max) {
    4747        image = img;
    48        
     48
    4949        this.min = min;
    5050        this.max = max;
     
    7070
    7171    /**
    72      * Recalculate the new bounding box of the image based on the four points provided as parameters. 
    73      * The new bbox defined in [min.max] will retain the extreme values of both boxes. 
     72     * Recalculate the new bounding box of the image based on the four points provided as parameters.
     73     * The new bbox defined in [min.max] will retain the extreme values of both boxes.
    7474     * @param p1 one of the bounding box corner
    7575     * @param p2 one of the bounding box corner
     
    128128                    g.drawLine(croppedPoint[i].x, croppedPoint[i].y, croppedPoint[i+1].x, croppedPoint[i+1].y);
    129129                }
    130                 /* 
     130                /*
    131131                //Uncomment this section to display the original image size (before cropping)
    132132                Point[] orgPoint = new Point[5];
     
    212212            imageOriginalHeight = in.readInt();
    213213            imageOriginalWidth =  in.readInt();
    214         }       
     214        }
    215215        image = (BufferedImage) ImageIO.read(ImageIO.createImageInputStream(in));
    216216        updatePixelPer();
     
    276276        }
    277277    }
    278    
     278
    279279    /**
    280280     * Change this image scale by moving the min,max coordinates around an anchor
    281      * @param anchor 
     281     * @param anchor
    282282     * @param proportion
    283283     */
     
    324324        angle+=delta_ang;
    325325    }
    326    
     326
    327327    /**
    328328     * Crop the image based on new bbox coordinates adj1 and adj2 (for raster images only).
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/ImageModifier.java

    r20931 r23190  
    1919
    2020    protected int parcelColor = Color.RED.getRGB();
    21    
     21
    2222    public BufferedImage bufferedImage;
    2323
     
    3131            new byte[] { (byte) 0, (byte) 0xFF }
    3232        );
    33        
     33
    3434        BufferedImage dest = new BufferedImage(
    3535            src.getWidth(), src.getHeight(),
     
    3737            icm
    3838            );
    39        
     39
    4040        ColorConvertOp cco = new ColorConvertOp(
    4141            src.getColorModel().getColorSpace(),
     
    4343            null
    4444            );
    45        
     45
    4646        cco.filter(src, dest);
    47        
     47
    4848        return dest;
    4949      }
     
    7272        return convert4(src, cmap);
    7373      }
    74        
     74
    7575      /**
    7676       * Converts the source image to 4-bit colour
     
    9696            );
    9797        cco.filter(src, dest);
    98        
     98
    9999        return dest;
    100100      }
    101      
     101
    102102    protected BufferedImage convert8(BufferedImage src) {
    103103        BufferedImage dest = new BufferedImage(
     
    115115
    116116    public boolean isBuildingColor(int rgb, boolean ignoreParcelColor) {
    117         for (int i = 0; i < cBuilingFootColors.length; i++) 
     117        for (int i = 0; i < cBuilingFootColors.length; i++)
    118118            if (rgb == cBuilingFootColors[i])
    119119                    return true;
     
    124124
    125125    public boolean isRoofColor(int rgb, boolean ignoreParcelColor) {
    126         for (int i = 0; i < cRoofColors.length; i++) 
     126        for (int i = 0; i < cRoofColors.length; i++)
    127127            if (rgb == cRoofColors[i])
    128128                    return true;
     
    152152        return ret;
    153153    }
    154    
     154
    155155    /**
    156156     * Checks if the rgb value is the black background color
    157      * @param 
     157     * @param
    158158     * @return
    159159     */
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrabPlanImage.java

    r21493 r23190  
    180180     */
    181181    private boolean startCropping() {
    182             mode = cGetCorners;
    183             countMouseClicked = 0;
    184                 Object[] options = { "OK", "Cancel" };
    185                 int ret = JOptionPane.showOptionDialog( null,
    186                                 tr("Click first corner for image cropping\n(two points required)"),
    187                                 tr("Image cropping"),
    188                         JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE,
    189                         null, options, options[0]);
    190             if (ret == JOptionPane.OK_OPTION) {
    191                 mouseClickedTime = System.currentTimeMillis();
    192             } else
    193                 if (canceledOrRestartCurrAction("image cropping"))
    194                         return startCropping();
    195             return true;
     182        mode = cGetCorners;
     183        countMouseClicked = 0;
     184        Object[] options = { "OK", "Cancel" };
     185        int ret = JOptionPane.showOptionDialog( null,
     186                tr("Click first corner for image cropping\n(two points required)"),
     187                tr("Image cropping"),
     188                JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE,
     189                null, options, options[0]);
     190        if (ret == JOptionPane.OK_OPTION) {
     191            mouseClickedTime = System.currentTimeMillis();
     192        } else
     193            if (canceledOrRestartCurrAction("image cropping"))
     194                return startCropping();
     195        return true;
    196196    }
    197197
     
    201201     */
    202202    private boolean continueCropping() {
    203                 Object[] options = { "OK", "Cancel" };
    204                 int ret = JOptionPane.showOptionDialog( null,
    205                                 tr("Click second corner for image cropping"),
    206                                 tr("Image cropping"),
    207                         JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE,
    208                         null, options, options[0]);
    209             if (ret != JOptionPane.OK_OPTION) {
    210                 if (canceledOrRestartCurrAction("image cropping"))
    211                         return startCropping();
    212             }
    213             return true;
     203        Object[] options = { "OK", "Cancel" };
     204        int ret = JOptionPane.showOptionDialog( null,
     205                tr("Click second corner for image cropping"),
     206                tr("Image cropping"),
     207                JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE,
     208                null, options, options[0]);
     209        if (ret != JOptionPane.OK_OPTION) {
     210            if (canceledOrRestartCurrAction("image cropping"))
     211                return startCropping();
     212        }
     213        return true;
    214214    }
    215215
     
    219219     */
    220220    private boolean startGeoreferencing() {
    221             countMouseClicked = 0;
    222             mode = cGetLambertCrosspieces;
    223                 Object[] options = { "OK", "Cancel" };
    224                 int ret = JOptionPane.showOptionDialog( null,
    225                                 tr("Click first Lambert crosspiece for georeferencing\n(two points required)"),
    226                                 tr("Image georeferencing"),
    227                         JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE,
    228                         null, options, options[0]);
    229             if (ret == JOptionPane.OK_OPTION) {
    230                 mouseClickedTime = System.currentTimeMillis();
    231             } else
    232                 if (canceledOrRestartCurrAction("georeferencing"))
    233                         return startGeoreferencing();
    234             return true;
     221        countMouseClicked = 0;
     222        mode = cGetLambertCrosspieces;
     223        Object[] options = { "OK", "Cancel" };
     224        int ret = JOptionPane.showOptionDialog( null,
     225                tr("Click first Lambert crosspiece for georeferencing\n(two points required)"),
     226                tr("Image georeferencing"),
     227                JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE,
     228                null, options, options[0]);
     229        if (ret == JOptionPane.OK_OPTION) {
     230            mouseClickedTime = System.currentTimeMillis();
     231        } else
     232            if (canceledOrRestartCurrAction("georeferencing"))
     233                return startGeoreferencing();
     234        return true;
    235235    }
    236236
     
    240240     */
    241241    private boolean continueGeoreferencing() {
    242                 Object[] options = { "OK", "Cancel" };
    243                 int ret = JOptionPane.showOptionDialog( null,
    244                                 tr("Click second Lambert crosspiece for georeferencing"),
    245                                 tr("Image georeferencing"),
    246                         JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE,
    247                         null, options, options[0]);
    248             if (ret != JOptionPane.OK_OPTION) {
    249                 if (canceledOrRestartCurrAction("georeferencing"))
    250                         return startGeoreferencing();
    251             }
    252             return true;
     242        Object[] options = { "OK", "Cancel" };
     243        int ret = JOptionPane.showOptionDialog( null,
     244                tr("Click second Lambert crosspiece for georeferencing"),
     245                tr("Image georeferencing"),
     246                JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE,
     247                null, options, options[0]);
     248        if (ret != JOptionPane.OK_OPTION) {
     249            if (canceledOrRestartCurrAction("georeferencing"))
     250                return startGeoreferencing();
     251        }
     252        return true;
    253253    }
    254254   
     
    271271     */
    272272    private boolean canceledOrRestartCurrAction(String action) {
    273         Object[] options = { "Cancel", "Retry" };
    274         int selectedValue = JOptionPane.showOptionDialog( null,
    275                         tr("Do you want to cancel completely\n"+
    276                                         "or just retry "+action+" ?"), "",
    277                         JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE,
    278                         null, options, options[0]);
     273        Object[] options = { "Cancel", "Retry" };
     274        int selectedValue = JOptionPane.showOptionDialog( null,
     275                tr("Do you want to cancel completely\n"+
     276                        "or just retry "+action+" ?"), "",
     277                JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE,
     278                null, options, options[0]);
    279279        countMouseClicked = 0;
    280280        if (selectedValue == 0) { // "Cancel"
    281                 // remove layer
    282                 Main.map.mapView.removeLayer(wmsLayer);
     281            // remove layer
     282            Main.map.mapView.removeLayer(wmsLayer);
    283283            wmsLayer = null;
    284284            Main.map.mapView.removeMouseListener(this);
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionLoadFromCache.java

    r20824 r23190  
    7777                    if (wmsLayer.getCacheControl().loadCache(file, layoutZone)) {
    7878                        CadastrePlugin.addWMSLayer(wmsLayer);
    79                     }                   
     79                    }
    8080                }
    8181            }
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionNewLocation.java

    r21202 r23190  
    2525
    2626    private static final long serialVersionUID = 1L;
    27    
     27
    2828    private static final String departements[] = {
    2929        "", tr("(optional)"),
    3030        "001", "01 - Ain",                 "002", "02 - Aisne",              "003", "03 - Allier",                "004", "04 - Alpes de Haute-Provence", "005", "05 - Hautes-Alpes",
    3131        "006", "06 - Alpes-Maritimes",     "007", "07 - Ard\u00eache",       "008", "08 - Ardennes",              "009", "09 - Ari\u00e8ge",             "010", "10 - Aube",
    32         "011", "11 - Aude",                "012", "12 - Aveyron",            "013", "13 - Bouches-du-Rh\u00f4ne", "014", "14 - Calvados",                "015", "15 - Cantal", 
    33         "016", "16 - Charente",            "017", "17 - Charente-Maritime",  "018", "18 - Cher",                  "019", "19 - Corr\u00e8ze", 
    34         "02A", "2A - Corse-du-Sud",        "02B", "2B - Haute-Corse", 
    35         "021", "21 - C\u00f4te-d'Or",      "022", "22 - C\u00f4tes d'Armor", "023", "23 - Creuse",                "024", "24 - Dordogne",                "025", "25 - Doubs", 
     32        "011", "11 - Aude",                "012", "12 - Aveyron",            "013", "13 - Bouches-du-Rh\u00f4ne", "014", "14 - Calvados",                "015", "15 - Cantal",
     33        "016", "16 - Charente",            "017", "17 - Charente-Maritime",  "018", "18 - Cher",                  "019", "19 - Corr\u00e8ze",
     34        "02A", "2A - Corse-du-Sud",        "02B", "2B - Haute-Corse",
     35        "021", "21 - C\u00f4te-d'Or",      "022", "22 - C\u00f4tes d'Armor", "023", "23 - Creuse",                "024", "24 - Dordogne",                "025", "25 - Doubs",
    3636        "026", "26 - Dr\u00f4me",          "027", "27 - Eure",               "028", "28 - Eure-et-Loir",          "029", "29 - Finist\u00e8re",          "030", "30 - Gard",
    37         "031", "31 - Haute-Garonne",       "032", "32 - Gers",               "033", "33 - Gironde",               "034", "34 - H\u00e9rault",            "035", "35 - Ille-et-Vilaine", 
     37        "031", "31 - Haute-Garonne",       "032", "32 - Gers",               "033", "33 - Gironde",               "034", "34 - H\u00e9rault",            "035", "35 - Ille-et-Vilaine",
    3838        "036", "36 - Indre",               "037", "37 - Indre-et-Loire",     "038", "38 - Is\u00e8re",            "039", "39 - Jura",                    "040", "40 - Landes",
    39         "041", "41 - Loir-et-Cher",        "042", "42 - Loire",              "043", "43 - Haute-Loire",           "044", "44 - Loire-Atlantique",        "045", "45 - Loiret", 
     39        "041", "41 - Loir-et-Cher",        "042", "42 - Loire",              "043", "43 - Haute-Loire",           "044", "44 - Loire-Atlantique",        "045", "45 - Loiret",
    4040        "046", "46 - Lot",                 "047", "47 - Lot-et-Garonne",     "048", "48 - Loz\u00e8re",           "049", "49 - Maine-et-Loire",          "050", "50 - Manche",
    41         "051", "51 - Marne",               "052", "52 - Haute-Marne",        "053", "53 - Mayenne",               "054", "54 - Meurthe-et-Moselle",      "055", "55 - Meuse", 
     41        "051", "51 - Marne",               "052", "52 - Haute-Marne",        "053", "53 - Mayenne",               "054", "54 - Meurthe-et-Moselle",      "055", "55 - Meuse",
    4242        "056", "56 - Morbihan",            "057", "57 - Moselle",            "058", "58 - Ni\u00e8vre",           "059", "59 - Nord",                    "060", "60 - Oise",
    43         "061", "61 - Orne",                "062", "62 - Pas-de-Calais",      "063", "63 - Puy-de-D\u00f4me",      "064", "64 - Pyr\u00e9n\u00e9es-Atlantiques", "065", "65 - Hautes-Pyr\u00e9n\u00e9es", 
     43        "061", "61 - Orne",                "062", "62 - Pas-de-Calais",      "063", "63 - Puy-de-D\u00f4me",      "064", "64 - Pyr\u00e9n\u00e9es-Atlantiques", "065", "65 - Hautes-Pyr\u00e9n\u00e9es",
    4444        "066", "66 - Pyr\u00e9n\u00e9es-Orientales", "067", "67 - Bas-Rhin", "068", "68 - Haut-Rhin",             "069", "69 - Rh\u00f4ne",              "070", "70 - Haute-Sa\u00f4ne",
    45         "071", "71 - Sa\u00f4ne-et-Loire", "072", "72 - Sarthe",             "073", "73 - Savoie",                "074", "74 - Haute-Savoie",            "075", "75 - Paris", 
     45        "071", "71 - Sa\u00f4ne-et-Loire", "072", "72 - Sarthe",             "073", "73 - Savoie",                "074", "74 - Haute-Savoie",            "075", "75 - Paris",
    4646        "076", "76 - Seine-Maritime",      "077", "77 - Seine-et-Marne",     "078", "78 - Yvelines",              "079", "79 - Deux-S\u00e8vres",        "080", "80 - Somme",
    47         "081", "81 - Tarn",                "082", "82 - Tarn-et-Garonne",    "083", "83 - Var",                   "084", "84 - Vaucluse",                "085", "85 - Vend\u00e9e", 
     47        "081", "81 - Tarn",                "082", "82 - Tarn-et-Garonne",    "083", "83 - Var",                   "084", "84 - Vaucluse",                "085", "85 - Vend\u00e9e",
    4848        "086", "86 - Vienne",              "087", "87 - Haute-Vienne",       "088", "88 - Vosges",                "089", "89 - Yonne",                   "090", "90 - Territoire de Belfort",
    49         "091", "91 - Essonne",             "092", "92 - Hauts-de-Seine",     "093", "93 - Seine-Saint-Denis",     "094", "94 - Val-de-Marne",            "095", "95 - Val-d'Oise", 
     49        "091", "91 - Essonne",             "092", "92 - Hauts-de-Seine",     "093", "93 - Seine-Saint-Denis",     "094", "94 - Val-de-Marne",            "095", "95 - Val-d'Oise",
    5050        "971", "971 - Guadeloupe",         "972", "972 - Martinique",        "973", "973 - Guyane",               "974", "974 - R\u00e9union"
    5151    };
     
    8181            for (int i=0; i < departements.length; i=i+2)
    8282                if (departements[i].equals(Main.pref.get("cadastrewms.codeDepartement")))
    83                     inputDepartement.setSelectedIndex(i/2);       
     83                    inputDepartement.setSelectedIndex(i/2);
    8484        }
    8585        p.add(labelSectionNewLocation, GBC.eol());
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java

    r22547 r23190  
    104104
    105105    @Override
    106         public void destroy() {
     106    public void destroy() {
    107107        // if the layer is currently saving the images in the cache, wait until it's finished
    108108        if (cacheControl != null) {
     
    305305        saveAsPng.setEnabled(isRaster);
    306306        return new Action[] {
    307                         LayerListDialog.getInstance().createShowHideLayerAction(),
     307                LayerListDialog.getInstance().createShowHideLayerAction(),
    308308                LayerListDialog.getInstance().createDeleteLayerAction(),
    309309                new MenuActionLoadFromCache(),
Note: See TracChangeset for help on using the changeset viewer.