Changeset 30173 in osm for applications/editors/josm/plugins/print/src/org
- Timestamp:
- 2014-01-02T17:51:00+01:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintDialog.java
r29848 r30173 236 236 caption = new JLabel(" 1 :"); 237 237 add(caption, std.grid(GBC.RELATIVE, row)); 238 int mapScale = (int)Main.pref.getInteger("print.map-scale", PrintPlugin.DEF_MAP_SCALE);238 int mapScale = Main.pref.getInteger("print.map-scale", PrintPlugin.DEF_MAP_SCALE); 239 239 mapView.setFixedMapScale(mapScale); 240 240 scaleModel = new SpinnerNumberModel(mapScale, 500, 5000000, 500); … … 265 265 add(caption, std.grid(GBC.RELATIVE, row)); 266 266 resolutionModel = new SpinnerNumberModel( 267 (int)Main.pref.getInteger("print.resolution.dpi", PrintPlugin.DEF_RESOLUTION_DPI),267 Main.pref.getInteger("print.resolution.dpi", PrintPlugin.DEF_RESOLUTION_DPI), 268 268 30, 1200, 10 ); 269 269 final JSpinner resolutionField = new JSpinner(resolutionModel); -
applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintPlugin.java
r29848 r30173 28 28 import javax.swing.KeyStroke; 29 29 30 import org.openstreetmap.gui.jmapviewer.tilesources.AbstractOsmTileSource;31 30 import org.openstreetmap.josm.Main; 32 31 import org.openstreetmap.josm.gui.MapFrame; … … 80 79 81 80 fileMenu.insertSeparator(pos); 82 83 /* Make this plugin's preferences known */84 Main.pref.putDefault(85 "print.map-scale", Integer.toString(DEF_MAP_SCALE));86 Main.pref.putDefault(87 "print.resolution.dpi", Integer.toString(DEF_RESOLUTION_DPI));88 Main.pref.putDefault(89 "print.attribution", AbstractOsmTileSource.DEFAULT_OSM_ATTRIBUTION);90 Main.pref.putDefault(91 "print.preview.enabled", new Boolean(false).toString());92 81 93 82 restorePrefs(); // Recover after crash if necessary … … 175 164 176 165 /** 177 * Undo temporary adjustments to the preferences made by 178 * adjustPrefs(). 166 * Undo temporary adjustments to the preferences made by adjustPrefs(). 179 167 */ 180 168 public static void restorePrefs() { … … 201 189 Main.pref.put(savedKey, null); 202 190 } 203 204 191 } 205
Note:
See TracChangeset
for help on using the changeset viewer.