Changeset 17089 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePreferenceSetting.java
- Timestamp:
- 2009-08-16T23:36:16+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePreferenceSetting.java
r16007 r17089 50 50 JLabel jLabelCacheSize = new JLabel(tr("Max. cache size (in MB)")); 51 51 private JTextField cacheSize = new JTextField(20); 52 53 static final String DEFAULT_RASTER_DIVIDER = "5"; 54 private JTextField rasterDivider = new JTextField(10); 52 55 53 56 public void addGui(final PreferenceDialog gui) { … … 103 106 cadastrewms.add(drawBoundaries, GBC.eop().insets(0, 0, 0, 5)); 104 107 105 // the downloaded images multiplier106 JLabel jLabelScale = new JLabel(tr(" Imagegrab multiplier:"));108 // the vectorized images multiplier 109 JLabel jLabelScale = new JLabel(tr("Vector images grab multiplier:")); 107 110 cadastrewms.add(jLabelScale, GBC.std().insets(0, 5, 10, 0)); 108 111 ButtonGroup bg = new ButtonGroup(); … … 151 154 cadastrewms.add(grabMultiplier4Size, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 5, 0, 5)); 152 155 156 // for raster images (not vectorized), image grab divider (from 1 to 10) 157 String savedRasterDivider = Main.pref.get("cadastrewms.rasterDivider", DEFAULT_RASTER_DIVIDER); 158 JLabel jLabelRasterDivider = new JLabel(tr("Raster images grab multiplier:")); 159 rasterDivider.setText(savedRasterDivider); 160 rasterDivider.setToolTipText("Raster image grab division, from 1 to 10; 10 is very high definition"); 161 cadastrewms.add(jLabelRasterDivider, GBC.std().insets(0, 5, 10, 0)); 162 cadastrewms.add(rasterDivider, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 5, 200, 5)); 163 153 164 // option to enable automatic caching 154 165 enableCache.addActionListener(new ActionListener() { … … 167 178 cacheSize.setToolTipText(tr("Oldest files are automatically deleted when this size is exceeded")); 168 179 cadastrewms.add(jLabelCacheSize, GBC.std().insets(20, 0, 0, 0)); 169 cadastrewms.add(cacheSize, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 5, 0, 5)); 170 180 cadastrewms.add(cacheSize, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 5, 200, 5)); 181 171 182 cadastrewms.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.VERTICAL)); 172 183 … … 196 207 } 197 208 } 209 try { 210 int i = Integer.parseInt(rasterDivider.getText()); 211 if (i > 0 && i < 11) 212 Main.pref.put("cadastrewms.rasterDivider", String.valueOf(i)); 213 } catch (NumberFormatException e) { // ignore the last input 214 } 198 215 Main.pref.put("cadastrewms.enableCaching", enableCache.isSelected()); 199 216
Note:
See TracChangeset
for help on using the changeset viewer.