Changeset 12841 in josm for trunk/src/org/openstreetmap/josm/gui/preferences
- Timestamp:
- 2017-09-13T16:30:27+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/preferences
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
r12825 r12841 423 423 424 424 if (!iconPaths.isEmpty()) { 425 if (Main.pref.put Collection(iconPref, iconPaths)) {425 if (Main.pref.putList(iconPref, iconPaths)) { 426 426 changed = true; 427 427 } 428 } else if (Main.pref.put Collection(iconPref, null)) {428 } else if (Main.pref.putList(iconPref, null)) { 429 429 changed = true; 430 430 } -
trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
r12643 r12841 496 496 @Override 497 497 public void actionPerformed(ActionEvent e) { 498 Collection<String> t = new LinkedList<>(getToolString());498 List<String> t = new LinkedList<>(getToolString()); 499 499 ActionParser parser = new ActionParser(null); 500 500 // get text definition of current action … … 502 502 // remove the button from toolbar preferences 503 503 t.remove(res); 504 Main.pref.put Collection("toolbar", t);504 Main.pref.putList("toolbar", t); 505 505 MainApplication.getToolbar().refreshToolbarControl(); 506 506 } … … 532 532 public void actionPerformed(ActionEvent e) { 533 533 boolean sel = ((JCheckBoxMenuItem) e.getSource()).getState(); 534 Main.pref.put ("toolbar.always-visible", sel);535 Main.pref.put ("menu.always-visible", sel);534 Main.pref.putBoolean("toolbar.always-visible", sel); 535 Main.pref.putBoolean("menu.always-visible", sel); 536 536 } 537 537 }); … … 971 971 @Override 972 972 public boolean ok() { 973 Collection<String> t = new LinkedList<>();973 List<String> t = new LinkedList<>(); 974 974 ActionParser parser = new ActionParser(null); 975 975 for (int i = 0; i < selected.size(); ++i) { … … 987 987 t = Collections.singletonList(EMPTY_TOOLBAR_MARKER); 988 988 } 989 Main.pref.put Collection("toolbar", t);989 Main.pref.putList("toolbar", t); 990 990 MainApplication.getToolbar().refreshToolbarControl(); 991 991 return false; … … 1074 1074 public static Collection<String> getToolString() { 1075 1075 1076 Collection<String> toolStr = Main.pref.get Collection("toolbar", Arrays.asList(deftoolbar));1076 Collection<String> toolStr = Main.pref.getList("toolbar", Arrays.asList(deftoolbar)); 1077 1077 if (toolStr == null || toolStr.isEmpty()) { 1078 1078 toolStr = Arrays.asList(deftoolbar); … … 1214 1214 } 1215 1215 } 1216 Main.pref.put Collection("toolbar", t);1216 Main.pref.putList("toolbar", t); 1217 1217 MainApplication.getToolbar().refreshToolbarControl(); 1218 1218 } -
trunk/src/org/openstreetmap/josm/gui/preferences/audio/AudioPreference.java
r9778 r12841 133 133 @Override 134 134 public boolean ok() { 135 Main.pref.put ("audio.menuinvisible", !audioMenuVisible.isSelected());136 Main.pref.put ("marker.traceaudio", markerAudioTraceVisible.isSelected());137 Main.pref.put ("marker.buttonlabels", markerButtonLabels.isSelected());138 Main.pref.put ("marker.audiofromexplicitwaypoints", audioMarkersFromExplicitWaypoints.isSelected());139 Main.pref.put ("marker.audiofromuntimedwaypoints", audioMarkersFromUntimedWaypoints.isSelected());140 Main.pref.put ("marker.audiofromnamedtrackpoints", audioMarkersFromNamedTrackpoints.isSelected());141 Main.pref.put ("marker.audiofromwavtimestamps", audioMarkersFromWavTimestamps.isSelected());142 Main.pref.put ("marker.audiofromstart", audioMarkersFromStart.isSelected());135 Main.pref.putBoolean("audio.menuinvisible", !audioMenuVisible.isSelected()); 136 Main.pref.putBoolean("marker.traceaudio", markerAudioTraceVisible.isSelected()); 137 Main.pref.putBoolean("marker.buttonlabels", markerButtonLabels.isSelected()); 138 Main.pref.putBoolean("marker.audiofromexplicitwaypoints", audioMarkersFromExplicitWaypoints.isSelected()); 139 Main.pref.putBoolean("marker.audiofromuntimedwaypoints", audioMarkersFromUntimedWaypoints.isSelected()); 140 Main.pref.putBoolean("marker.audiofromnamedtrackpoints", audioMarkersFromNamedTrackpoints.isSelected()); 141 Main.pref.putBoolean("marker.audiofromwavtimestamps", audioMarkersFromWavTimestamps.isSelected()); 142 Main.pref.putBoolean("marker.audiofromstart", audioMarkersFromStart.isSelected()); 143 143 Main.pref.put("audio.forwardbackamount", audioForwardBackAmount.getText()); 144 144 Main.pref.put("audio.fastfwdmultiplier", audioFastForwardMultiplier.getText()); -
trunk/src/org/openstreetmap/josm/gui/preferences/display/DrawingPreference.java
r12400 r12841 109 109 // virtual nodes 110 110 virtualNodes.setToolTipText(tr("Draw virtual nodes in select mode for easy way modification.")); 111 virtualNodes.setSelected(Main.pref.getInt eger("mappaint.node.virtual-size", 8) != 0);111 virtualNodes.setSelected(Main.pref.getInt("mappaint.node.virtual-size", 8) != 0); 112 112 113 113 // background layers in inactive color … … 195 195 public boolean ok() { 196 196 boolean restart = gpxPanel.savePreferences(); 197 Main.pref.put ("draw.data.area_outline_only", outlineOnly.isSelected());198 Main.pref.put ("draw.segment.direction", directionHint.isSelected());199 Main.pref.put ("draw.segment.head_only", headArrow.isSelected());200 Main.pref.put ("draw.oneway", onewayArrow.isSelected());201 Main.pref.put ("draw.segment.order_number", segmentOrderNumber.isSelected());202 Main.pref.put ("draw.segment.order_number.on_selected", segmentOrderNumberOnSelectedWay.isSelected());203 Main.pref.put ("draw.data.downloaded_area", sourceBounds.isSelected());204 Main.pref.put ("draw.data.inactive_color", inactive.isSelected());205 Main.pref.put ("mappaint.use-antialiasing", useAntialiasing.isSelected());206 Main.pref.put ("mappaint.wireframe.use-antialiasing", useWireframeAntialiasing.isSelected());207 Main.pref.put ("draw.target-highlight", useHighlighting.isSelected());208 Main.pref.put ("draw.helper-line", drawHelperLine.isSelected());209 Main.pref.put ("display.discardable-keys", discardableKeys.isSelected());197 Main.pref.putBoolean("draw.data.area_outline_only", outlineOnly.isSelected()); 198 Main.pref.putBoolean("draw.segment.direction", directionHint.isSelected()); 199 Main.pref.putBoolean("draw.segment.head_only", headArrow.isSelected()); 200 Main.pref.putBoolean("draw.oneway", onewayArrow.isSelected()); 201 Main.pref.putBoolean("draw.segment.order_number", segmentOrderNumber.isSelected()); 202 Main.pref.putBoolean("draw.segment.order_number.on_selected", segmentOrderNumberOnSelectedWay.isSelected()); 203 Main.pref.putBoolean("draw.data.downloaded_area", sourceBounds.isSelected()); 204 Main.pref.putBoolean("draw.data.inactive_color", inactive.isSelected()); 205 Main.pref.putBoolean("mappaint.use-antialiasing", useAntialiasing.isSelected()); 206 Main.pref.putBoolean("mappaint.wireframe.use-antialiasing", useWireframeAntialiasing.isSelected()); 207 Main.pref.putBoolean("draw.target-highlight", useHighlighting.isSelected()); 208 Main.pref.putBoolean("draw.helper-line", drawHelperLine.isSelected()); 209 Main.pref.putBoolean("display.discardable-keys", discardableKeys.isSelected()); 210 210 AutoFilterManager.PROP_AUTO_FILTER_ENABLED.put(autoFilters.isSelected()); 211 211 AutoFilterManager.PROP_AUTO_FILTER_RULE.put(((AutoFilterRule) autoFilterRules.getSelectedItem()).getKey()); 212 int vn = Main.pref.getInt eger("mappaint.node.virtual-size", 8);212 int vn = Main.pref.getInt("mappaint.node.virtual-size", 8); 213 213 if (virtualNodes.isSelected()) { 214 214 if (vn < 1) { … … 218 218 vn = 0; 219 219 } 220 Main.pref.putInt eger("mappaint.node.virtual-size", vn);220 Main.pref.putInt("mappaint.node.virtual-size", vn); 221 221 return restart; 222 222 } -
trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java
r12620 r12841 454 454 layerNameDot = ""; 455 455 } 456 Main.pref.put ("marker.makeautomarkers"+layerNameDot, makeAutoMarkers.isSelected());456 Main.pref.putBoolean("marker.makeautomarkers"+layerNameDot, makeAutoMarkers.isSelected()); 457 457 if (drawRawGpsLinesGlobal.isSelected()) { 458 458 Main.pref.put("draw.rawgps.lines" + layerNameDot, null); … … 466 466 } else { 467 467 if (layerName == null || !locLayer) { 468 Main.pref.put ("draw.rawgps.lines" + layerNameDot, drawRawGpsLinesAll.isSelected());468 Main.pref.putBoolean("draw.rawgps.lines" + layerNameDot, drawRawGpsLinesAll.isSelected()); 469 469 Main.pref.put("draw.rawgps.max-line-length" + layerNameDot, drawRawGpsMaxLineLength.getText()); 470 470 } 471 471 if (layerName == null || locLayer) { 472 Main.pref.put ("draw.rawgps.lines.local" + layerNameDot, drawRawGpsLinesAll.isSelected() || drawRawGpsLinesLocal.isSelected());472 Main.pref.putBoolean("draw.rawgps.lines.local" + layerNameDot, drawRawGpsLinesAll.isSelected() || drawRawGpsLinesLocal.isSelected()); 473 473 Main.pref.put("draw.rawgps.max-line-length.local" + layerNameDot, drawRawGpsMaxLineLengthLocal.getText()); 474 474 } 475 Main.pref.put ("draw.rawgps.lines.force"+layerNameDot, forceRawGpsLines.isSelected());476 Main.pref.put ("draw.rawgps.direction"+layerNameDot, drawGpsArrows.isSelected());477 Main.pref.put ("draw.rawgps.alternatedirection"+layerNameDot, drawGpsArrowsFast.isSelected());475 Main.pref.putBoolean("draw.rawgps.lines.force"+layerNameDot, forceRawGpsLines.isSelected()); 476 Main.pref.putBoolean("draw.rawgps.direction"+layerNameDot, drawGpsArrows.isSelected()); 477 Main.pref.putBoolean("draw.rawgps.alternatedirection"+layerNameDot, drawGpsArrowsFast.isSelected()); 478 478 Main.pref.put("draw.rawgps.min-arrow-distance"+layerNameDot, drawGpsArrowsMinDist.getText()); 479 479 } 480 480 481 Main.pref.put ("draw.rawgps.hdopcircle"+layerNameDot, hdopCircleGpsPoints.isSelected());482 Main.pref.put ("draw.rawgps.large"+layerNameDot, largeGpsPoints.isSelected());481 Main.pref.putBoolean("draw.rawgps.hdopcircle"+layerNameDot, hdopCircleGpsPoints.isSelected()); 482 Main.pref.putBoolean("draw.rawgps.large"+layerNameDot, largeGpsPoints.isSelected()); 483 483 Main.pref.put("draw.rawgps.linewidth"+layerNameDot, drawLineWidth.getText()); 484 Main.pref.put ("draw.rawgps.lines.alpha-blend"+layerNameDot, drawLineWithAlpha.isSelected());485 486 Main.pref.put ("mappaint.gpx.use-antialiasing", useGpsAntialiasing.isSelected());484 Main.pref.putBoolean("draw.rawgps.lines.alpha-blend"+layerNameDot, drawLineWithAlpha.isSelected()); 485 486 Main.pref.putBoolean("mappaint.gpx.use-antialiasing", useGpsAntialiasing.isSelected()); 487 487 488 488 TemplateEntryProperty.forMarker(layerName).put(waypointLabelPattern.getText()); … … 495 495 return false; 496 496 } else if (colorTypeVelocity.isSelected()) { 497 Main.pref.putInt eger("draw.rawgps.colors"+layerNameDot, 1);497 Main.pref.putInt("draw.rawgps.colors"+layerNameDot, 1); 498 498 } else if (colorTypeDilution.isSelected()) { 499 Main.pref.putInt eger("draw.rawgps.colors"+layerNameDot, 2);499 Main.pref.putInt("draw.rawgps.colors"+layerNameDot, 2); 500 500 } else if (colorTypeDirection.isSelected()) { 501 Main.pref.putInt eger("draw.rawgps.colors"+layerNameDot, 3);501 Main.pref.putInt("draw.rawgps.colors"+layerNameDot, 3); 502 502 } else if (colorTypeTime.isSelected()) { 503 Main.pref.putInt eger("draw.rawgps.colors"+layerNameDot, 4);503 Main.pref.putInt("draw.rawgps.colors"+layerNameDot, 4); 504 504 } else if (colorTypeHeatMap.isSelected()) { 505 Main.pref.putInt eger("draw.rawgps.colors"+layerNameDot, 5);505 Main.pref.putInt("draw.rawgps.colors"+layerNameDot, 5); 506 506 } else { 507 Main.pref.putInt eger("draw.rawgps.colors"+layerNameDot, 0);508 } 509 Main.pref.put ("draw.rawgps.colors.dynamic"+layerNameDot, colorDynamic.isSelected());507 Main.pref.putInt("draw.rawgps.colors"+layerNameDot, 0); 508 } 509 Main.pref.putBoolean("draw.rawgps.colors.dynamic"+layerNameDot, colorDynamic.isSelected()); 510 510 int ccti = colorTypeVelocityTune.getSelectedIndex(); 511 Main.pref.putInt eger("draw.rawgps.colorTracksTune"+layerNameDot, ccti == 2 ? 10 : (ccti == 1 ? 20 : 45));512 Main.pref.putInt eger("draw.rawgps.heatmap.colormap"+layerNameDot, colorTypeHeatMapTune.getSelectedIndex());513 Main.pref.put ("draw.rawgps.heatmap.use-points"+layerNameDot, colorTypeHeatMapPoints.isSelected());514 Main.pref.putInt eger("draw.rawgps.heatmap.gain"+layerNameDot, colorTypeHeatMapGain.getValue());515 Main.pref.putInt eger("draw.rawgps.heatmap.lower-limit"+layerNameDot, colorTypeHeatMapLowerLimit.getValue());511 Main.pref.putInt("draw.rawgps.colorTracksTune"+layerNameDot, ccti == 2 ? 10 : (ccti == 1 ? 20 : 45)); 512 Main.pref.putInt("draw.rawgps.heatmap.colormap"+layerNameDot, colorTypeHeatMapTune.getSelectedIndex()); 513 Main.pref.putBoolean("draw.rawgps.heatmap.use-points"+layerNameDot, colorTypeHeatMapPoints.isSelected()); 514 Main.pref.putInt("draw.rawgps.heatmap.gain"+layerNameDot, colorTypeHeatMapGain.getValue()); 515 Main.pref.putInt("draw.rawgps.heatmap.lower-limit"+layerNameDot, colorTypeHeatMapLowerLimit.getValue()); 516 516 517 517 return false; -
trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java
r12620 r12841 202 202 public boolean ok() { 203 203 boolean mod = false; 204 Main.pref.put ("draw.splashscreen", showSplashScreen.isSelected());205 Main.pref.put ("osm-primitives.showid", showID.isSelected());206 Main.pref.put ("osm-primitives.localize-name", showLocalizedName.isSelected());204 Main.pref.putBoolean("draw.splashscreen", showSplashScreen.isSelected()); 205 Main.pref.putBoolean("osm-primitives.showid", showID.isSelected()); 206 Main.pref.putBoolean("osm-primitives.localize-name", showLocalizedName.isSelected()); 207 207 MapFrame.MODELESS.put(modeless.isSelected()); 208 Main.pref.put (ToggleDialog.PROP_DYNAMIC_BUTTONS.getKey(), dynamicButtons.isSelected());209 Main.pref.put (DateUtils.PROP_ISO_DATES.getKey(), isoDates.isSelected());210 Main.pref.put (FileChooserManager.PROP_USE_NATIVE_FILE_DIALOG.getKey(), nativeFileChoosers.isSelected());208 Main.pref.putBoolean(ToggleDialog.PROP_DYNAMIC_BUTTONS.getKey(), dynamicButtons.isSelected()); 209 Main.pref.putBoolean(DateUtils.PROP_ISO_DATES.getKey(), isoDates.isSelected()); 210 Main.pref.putBoolean(FileChooserManager.PROP_USE_NATIVE_FILE_DIALOG.getKey(), nativeFileChoosers.isSelected()); 211 211 MapMover.PROP_ZOOM_REVERSE_WHEEL.put(zoomReverseWheel.isSelected()); 212 212 NavigatableComponent.PROP_ZOOM_INTERMEDIATE_STEPS.put(zoomIntermediateSteps.isSelected()); -
trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java
r12649 r12841 105 105 @Override 106 106 public Collection<String> getInitialIconPathsList() { 107 return Main.pref.get Collection(ICONPREF, null);107 return Main.pref.getList(ICONPREF, null); 108 108 } 109 109 … … 170 170 @Override 171 171 public boolean ok() { 172 boolean reload = Main.pref.put ("mappaint.icon.enable-defaults", enableIconDefault.isSelected());172 boolean reload = Main.pref.putBoolean("mappaint.icon.enable-defaults", enableIconDefault.isSelected()); 173 173 reload |= sources.finish(); 174 174 if (reload) { -
trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java
r12649 r12841 206 206 @Override 207 207 public Collection<String> getInitialIconPathsList() { 208 return Main.pref.get Collection(ICONPREF, null);208 return Main.pref.getList(ICONPREF, null); 209 209 } 210 210 … … 246 246 @Override 247 247 public boolean ok() { 248 boolean restart = Main.pref.put ("taggingpreset.sortmenu", sortMenu.getSelectedObjects() != null);248 boolean restart = Main.pref.putBoolean("taggingpreset.sortmenu", sortMenu.getSelectedObjects() != null); 249 249 restart |= sources.finish(); 250 250 -
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java
r12634 r12841 302 302 List<String> l = new LinkedList<>(model.getSelectedPluginNames()); 303 303 Collections.sort(l); 304 Main.pref.put Collection("plugins", l);304 Main.pref.putList("plugins", l); 305 305 if (!model.getNewlyDeactivatedPlugins().isEmpty()) 306 306 return true; … … 359 359 model.updateAvailablePlugins(task.getAvailablePlugins()); 360 360 pnlPluginPreferences.refreshView(); 361 Main.pref.putInt eger("pluginmanager.version", Version.getInstance().getVersion()); // fix #7030361 Main.pref.putInt("pluginmanager.version", Version.getInstance().getVersion()); // fix #7030 362 362 }); 363 363 } -
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferencesModel.java
r12620 r12841 40 40 public PluginPreferencesModel() { 41 41 currentActivePlugins = new HashSet<>(); 42 currentActivePlugins.addAll(Main.pref.get Collection("plugins", currentActivePlugins));42 currentActivePlugins.addAll(Main.pref.getList("plugins")); 43 43 } 44 44 … … 80 80 filterDisplayedPlugins(filterExpression); 81 81 Set<String> activePlugins = new HashSet<>(); 82 activePlugins.addAll(Main.pref.get Collection("plugins", activePlugins));82 activePlugins.addAll(Main.pref.getList("plugins")); 83 83 for (PluginInformation pi: availablePlugins) { 84 84 if (selectedPluginsMap.get(pi) == null && activePlugins.contains(pi.name)) { … … 230 230 */ 231 231 public void initFromPreferences() { 232 Collection<String> enabledPlugins = Main.pref.get Collection("plugins", null);232 Collection<String> enabledPlugins = Main.pref.getList("plugins", null); 233 233 if (enabledPlugins == null) { 234 234 this.selectedPluginsMap.clear(); -
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java
r12620 r12841 196 196 } 197 197 if (days == 0) { 198 days = Main.pref.getInt eger("pluginmanager.time-based-update.interval", PluginHandler.DEFAULT_TIME_BASED_UPDATE_INTERVAL);198 days = Main.pref.getInt("pluginmanager.time-based-update.interval", PluginHandler.DEFAULT_TIME_BASED_UPDATE_INTERVAL); 199 199 } 200 200 tfUpdateInterval.setText(Integer.toString(days)); … … 235 235 days = PluginHandler.DEFAULT_TIME_BASED_UPDATE_INTERVAL; 236 236 } 237 Main.pref.putInt eger("pluginmanager.time-based-update.interval", days);237 Main.pref.putInt("pluginmanager.time-based-update.interval", days); 238 238 } 239 239 -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java
r12620 r12841 72 72 } 73 73 }); 74 Collection<String> samples = Arrays.asList(74 List<String> samples = Arrays.asList( 75 75 "+proj=lonlat +ellps=WGS84 +datum=WGS84 +bounds=-180,-90,180,90", 76 76 "+proj=tmerc +lat_0=0 +lon_0=9 +k_0=1 +x_0=3500000 +y_0=0 +ellps=bessel +nadgrids=BETA2007.gsb"); 77 List<String> inputHistory = new LinkedList<>(Main.pref.get Collection("projection.custom.value.history", samples));77 List<String> inputHistory = new LinkedList<>(Main.pref.getList("projection.custom.value.history", samples)); 78 78 Collections.reverse(inputHistory); 79 79 cbInput.setPossibleItems(inputHistory); … … 149 149 public void rememberHistory() { 150 150 cbInput.addCurrentItemToHistory(); 151 Main.pref.put Collection("projection.custom.value.history", cbInput.getHistory());151 Main.pref.putList("projection.custom.value.history", cbInput.getHistory()); 152 152 } 153 153 } -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java
r12786 r12841 28 28 import org.openstreetmap.josm.data.coor.conversion.CoordinateFormatManager; 29 29 import org.openstreetmap.josm.data.coor.conversion.ICoordinateFormat; 30 import org.openstreetmap.josm.data.preferences. CollectionProperty;30 import org.openstreetmap.josm.data.preferences.ListProperty; 31 31 import org.openstreetmap.josm.data.preferences.StringProperty; 32 32 import org.openstreetmap.josm.data.projection.CustomProjection; … … 291 291 private static final StringProperty PROP_PROJECTION_DEFAULT = new StringProperty("projection.default", mercator.getId()); 292 292 private static final StringProperty PROP_COORDINATES = new StringProperty("coordinates", null); 293 private static final CollectionProperty PROP_SUB_PROJECTION_DEFAULT = new CollectionProperty("projection.default.sub", null);293 private static final ListProperty PROP_SUB_PROJECTION_DEFAULT = new ListProperty("projection.default.sub", null); 294 294 private static final String[] unitsValues = ALL_SYSTEMS.keySet().toArray(new String[ALL_SYSTEMS.size()]); 295 295 private static final String[] unitsValuesTr = new String[unitsValues.length]; … … 482 482 } 483 483 id = pc.getId(); 484 Main.pref.put Collection("projection.sub."+id, pref);484 Main.pref.putList("projection.sub."+id, pref == null ? null : new ArrayList<>(pref)); 485 485 if (makeDefault) { 486 486 PROP_PROJECTION_DEFAULT.put(id); 487 PROP_SUB_PROJECTION_DEFAULT.put(pref );487 PROP_SUB_PROJECTION_DEFAULT.put(pref == null ? null : new ArrayList<>(pref)); 488 488 } else { 489 489 projectionChoice = id; … … 560 560 */ 561 561 public static Collection<String> getSubprojectionPreference(String pcId) { 562 return Main.pref.get Collection("projection.sub."+pcId, null);562 return Main.pref.getList("projection.sub."+pcId, null); 563 563 } 564 564 -
trunk/src/org/openstreetmap/josm/gui/preferences/remotecontrol/RemoteControlPreference.java
r12707 r12841 196 196 if (enabled) { 197 197 for (Entry<PermissionPrefWithDefault, JCheckBox> p : prefs.entrySet()) { 198 Main.pref.put (p.getKey().pref, p.getValue().isSelected());199 } 200 Main.pref.put (RequestHandler.loadInNewLayerKey, loadInNewLayer.isSelected());201 Main.pref.put (RequestHandler.globalConfirmationKey, alwaysAskUserConfirm.isSelected());198 Main.pref.putBoolean(p.getKey().pref, p.getValue().isSelected()); 199 } 200 Main.pref.putBoolean(RequestHandler.loadInNewLayerKey, loadInNewLayer.isSelected()); 201 Main.pref.putBoolean(RequestHandler.globalConfirmationKey, alwaysAskUserConfirm.isSelected()); 202 202 } 203 203 if (changed) { -
trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java
r12634 r12841 28 28 29 29 import org.openstreetmap.josm.Main; 30 import org.openstreetmap.josm.data.preferences. CollectionProperty;30 import org.openstreetmap.josm.data.preferences.ListProperty; 31 31 import org.openstreetmap.josm.gui.MainApplication; 32 32 import org.openstreetmap.josm.gui.help.HelpUtil; … … 58 58 /** indicates whether to use the default OSM URL or not */ 59 59 private JCheckBox cbUseDefaultServerUrl; 60 private final transient CollectionProperty SERVER_URL_HISTORY = new CollectionProperty("osm-server.url-history", Arrays.asList(60 private final transient ListProperty SERVER_URL_HISTORY = new ListProperty("osm-server.url-history", Arrays.asList( 61 61 "http://api06.dev.openstreetmap.org/api", "http://master.apis.dev.openstreetmap.org/api")); 62 62 -
trunk/src/org/openstreetmap/josm/gui/preferences/validator/ValidatorTestsPreference.java
r12649 r12841 97 97 @Override 98 98 public boolean ok() { 99 Collection<String> tests = new LinkedList<>();100 Collection<String> testsBeforeUpload = new LinkedList<>();99 List<String> tests = new LinkedList<>(); 100 List<String> testsBeforeUpload = new LinkedList<>(); 101 101 102 102 for (Test test : allTests) { … … 116 116 OsmValidator.initializeTests(testsToInitialize); 117 117 118 Main.pref.put Collection(ValidatorPrefHelper.PREF_SKIP_TESTS, tests);119 Main.pref.put Collection(ValidatorPrefHelper.PREF_SKIP_TESTS_BEFORE_UPLOAD, testsBeforeUpload);118 Main.pref.putList(ValidatorPrefHelper.PREF_SKIP_TESTS, tests); 119 Main.pref.putList(ValidatorPrefHelper.PREF_SKIP_TESTS_BEFORE_UPLOAD, testsBeforeUpload); 120 120 ValidatorPrefHelper.PREF_USE_IGNORE.put(prefUseIgnore.isSelected()); 121 121 ValidatorPrefHelper.PREF_OTHER.put(prefOther.isSelected());
Note:
See TracChangeset
for help on using the changeset viewer.