Ignore:
Timestamp:
2009-08-19T22:54:02+02:00 (17 years ago)
Author:
pieren
Message:

better handling of dialogs cancellations

File:
1 edited

Legend:

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

    r17089 r17181  
    66import java.awt.event.ActionListener;
    77import javax.swing.*;
     8
    89import org.openstreetmap.josm.Main;
    910import org.openstreetmap.josm.gui.preferences.PreferenceDialog;
     
    3435    private JCheckBox drawBoundaries = new JCheckBox(tr("Draw boundaries of downloaded data."));
    3536
     37    private JCheckBox disableImageCropping = new JCheckBox(tr("Disable image cropping during georeferencing."));
     38   
    3639    private JRadioButton grabMultiplier1 = new JRadioButton("", true);
    3740
     
    106109        cadastrewms.add(drawBoundaries, GBC.eop().insets(0, 0, 0, 5));
    107110
     111        // separator
     112        cadastrewms.add(new JSeparator(SwingConstants.HORIZONTAL), GBC.eol().fill(GBC.HORIZONTAL));
     113       
    108114        // the vectorized images multiplier
    109115        JLabel jLabelScale = new JLabel(tr("Vector images grab multiplier:"));
     
    154160        cadastrewms.add(grabMultiplier4Size, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 5, 0, 5));
    155161
     162        // separator
     163        cadastrewms.add(new JSeparator(SwingConstants.HORIZONTAL), GBC.eol().fill(GBC.HORIZONTAL));
     164
    156165        // for raster images (not vectorized), image grab divider (from 1 to 10)
    157166        String savedRasterDivider = Main.pref.get("cadastrewms.rasterDivider", DEFAULT_RASTER_DIVIDER);
     
    161170        cadastrewms.add(jLabelRasterDivider, GBC.std().insets(0, 5, 10, 0));
    162171        cadastrewms.add(rasterDivider, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 5, 200, 5));
     172        // option to disable image cropping during raster image georeferencing
     173        disableImageCropping.setSelected(Main.pref.getBoolean("cadastrewms.noImageCropping", false));
     174        disableImageCropping.setToolTipText(tr("Disable image cropping during georeferencing."));
     175        cadastrewms.add(disableImageCropping, GBC.eop().insets(0, 0, 0, 5));
     176
     177        // separator
     178        cadastrewms.add(new JSeparator(SwingConstants.HORIZONTAL), GBC.eol().fill(GBC.HORIZONTAL));
    163179
    164180        // option to enable automatic caching
     
    213229        } catch (NumberFormatException e) { // ignore the last input
    214230        }
     231        Main.pref.put("cadastrewms.noImageCropping", disableImageCropping.isSelected());
    215232        Main.pref.put("cadastrewms.enableCaching", enableCache.isSelected());
    216233
Note: See TracChangeset for help on using the changeset viewer.