- Timestamp:
- 2016-11-19T16:38:29+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/WMSSettingsPanel.java
r8526 r11287 16 16 import org.openstreetmap.josm.gui.layer.WMSLayer; 17 17 import org.openstreetmap.josm.tools.GBC; 18 import org.openstreetmap.josm.tools.Utils; 18 19 19 20 /** … … 22 23 */ 23 24 public class WMSSettingsPanel extends JPanel { 25 26 private static final int IMAGE_SIZE_MIN = 1; 27 private static final int IMAGE_SIZE_MAX = 4096; 28 private static final int THREADS_MIN = 1; 29 private static final int THREADS_MAX = 30; 24 30 25 31 // WMS Settings … … 43 49 add(Box.createHorizontalGlue(), GBC.eol().fill(GBC.HORIZONTAL)); 44 50 JLabel labelSimConn = new JLabel(tr("Simultaneous connections:")); 45 spinSimConn = new JSpinner(new SpinnerNumberModel(WMSCachedTileLoaderJob.THREAD_LIMIT.get().intValue(), 1, 30, 1)); 51 int threadLimitValue = Utils.clamp(WMSCachedTileLoaderJob.THREAD_LIMIT.get(), THREADS_MIN, THREADS_MAX); 52 spinSimConn = new JSpinner(new SpinnerNumberModel(threadLimitValue, THREADS_MIN, THREADS_MAX, 1)); 46 53 labelSimConn.setLabelFor(spinSimConn); 47 54 add(labelSimConn, GBC.std()); … … 51 58 // Tile size 52 59 JLabel labelTileSize = new JLabel(tr("Tile size:")); 53 tileSize = new JSpinner(new SpinnerNumberModel(WMSLayer.PROP_IMAGE_SIZE.get().intValue(), 1, 4096, 128)); 60 int tileSizeValue = Utils.clamp(WMSLayer.PROP_IMAGE_SIZE.get(), IMAGE_SIZE_MIN, IMAGE_SIZE_MAX); 61 tileSize = new JSpinner(new SpinnerNumberModel(tileSizeValue, IMAGE_SIZE_MIN, IMAGE_SIZE_MAX, 128)); 54 62 labelTileSize.setLabelFor(tileSize); 55 63 add(labelTileSize, GBC.std());
Note:
See TracChangeset
for help on using the changeset viewer.