Changeset 3530 in josm
- Timestamp:
- 2010-09-15T08:21:16+02:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 55 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
r3217 r3530 44 44 * The "surviving" node will be the one with the lowest positive id. 45 45 * (I.e. it was uploaded to the server and is the oldest one.) 46 * 46 * 47 47 * However we use the location of the node that was selected *last*. 48 48 * The "surviving" node will be moved to that location if it is … … 94 94 return targetNode; 95 95 } 96 96 97 97 /** 98 98 * Find which node to merge into (i.e. which one will be left) … … 119 119 return targetNode; 120 120 } 121 121 122 122 123 123 /** … … 193 193 return mergeNodes(layer, nodes, targetNode, targetNode); 194 194 } 195 195 196 196 /** 197 197 * Merges the nodes in <code>nodes</code> onto one of the nodes. Uses the dataset -
trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
r3501 r3530 137 137 } 138 138 msg.append("</ul>"); 139 139 140 140 HelpAwareOptionPane.showMessageDialogInEDT( 141 141 Main.parent, … … 179 179 public void run() { 180 180 JOptionPane.showMessageDialog(Main.parent, tr( 181 "<html>Cannot open directory ''{0}''.<br>Please select a file.</html>", 181 "<html>Cannot open directory ''{0}''.<br>Please select a file.</html>", 182 182 f.getAbsolutePath()), tr("Open file"), JOptionPane.ERROR_MESSAGE); 183 183 } 184 184 }); 185 // TODO when changing to Java 6: Don't cancel the 185 // TODO when changing to Java 6: Don't cancel the 186 186 // task here but use different modality. (Currently 2 dialogs 187 187 // would block each other.) -
trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
r3083 r3530 188 188 * Replies true if <code>node</code> is a required node which can't be removed 189 189 * in order to simplify the way. 190 * 190 * 191 191 * @param way the way to be simplified 192 192 * @param node the node to check … … 210 210 /** 211 211 * Simplifies a way 212 * 212 * 213 213 * @param w the way to simplify 214 214 */ … … 255 255 * Builds the simplified list of nodes for a way segment given by a lower index <code>from</code> 256 256 * and an upper index <code>to</code> 257 * 257 * 258 258 * @param wnew the way to simplify 259 259 * @param from the lower index -
trunk/src/org/openstreetmap/josm/actions/UploadAction.java
r2990 r3530 120 120 * Makes sure primitives in <code>apiData</code> don't participate in conflicts and 121 121 * runs the installed {@see UploadHook}s. 122 * 122 * 123 123 * @param layer the source layer of the data to be uploaded 124 124 * @param apiData the data to be uploaded … … 143 143 /** 144 144 * Uploads data to the OSM API. 145 * 145 * 146 146 * @param layer the source layer for the data to upload 147 147 * @param apiData the primitives to be added, updated, or deleted -
trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java
r3262 r3530 164 164 double xoff = en3.east() - base.east(); 165 165 double yoff = en3.north() - base.north(); 166 166 167 167 newN1en = new EastNorth(en1.getX() + xoff, en1.getY() + yoff); 168 168 newN2en = new EastNorth(en2.getX() + xoff, en2.getY() + yoff); -
trunk/src/org/openstreetmap/josm/data/APIDataSet.java
r3336 r3530 145 145 * Replies true if one of the primitives to be updated or to be deleted 146 146 * participates in the conflict <code>conflict</code> 147 * 147 * 148 148 * @param conflict the conflict 149 149 * @return true if one of the primitives to be updated or to be deleted … … 164 164 * Replies true if one of the primitives to be updated or to be deleted 165 165 * participates in at least one conflict in <code>conflicts</code> 166 * 166 * 167 167 * @param conflicts the collection of conflicts 168 168 * @return true if one of the primitives to be updated or to be deleted -
trunk/src/org/openstreetmap/josm/data/Preferences.java
r3527 r3530 102 102 } 103 103 104 protected void firePrefrenceChanged(String key, String oldValue, String newValue) { 104 protected void firePreferenceChanged(String key, String oldValue, String newValue) { 105 105 PreferenceChangeEvent evt = new DefaultPreferenceChangeEvent(key, oldValue, newValue); 106 106 for (PreferenceChangedListener l : listeners) { … … 114 114 protected final SortedMap<String, String> properties = new TreeMap<String, String>(); 115 115 protected final SortedMap<String, String> defaults = new TreeMap<String, String>(); 116 117 /**118 * Override some values on read. This is intended to be used for technology previews119 * where we want to temporarily modify things without changing the user's preferences120 * file.121 */122 protected static final SortedMap<String, String> override = new TreeMap<String, String>();123 static {124 //override.put("osm-server.version", "0.5");125 //override.put("osm-server.additional-versions", "");126 //override.put("osm-server.url", "http://openstreetmap.gryph.de/api");127 //override.put("plugins", null);128 }129 116 130 117 /** … … 198 185 199 186 synchronized public boolean hasKey(final String key) { 200 return override.containsKey(key) ? override.get(key) != null :properties.containsKey(key);187 return properties.containsKey(key); 201 188 } 202 189 203 190 synchronized public String get(final String key) { 204 191 putDefault(key, null); 205 if (override.containsKey(key))206 return override.get(key);207 192 if (!properties.containsKey(key)) 208 193 return ""; … … 212 197 synchronized public String get(final String key, final String def) { 213 198 putDefault(key, def); 214 if (override.containsKey(key))215 return override.get(key);216 199 final String prop = properties.get(key); 217 200 if (prop == null || prop.equals("")) … … 226 209 all.put(e.getKey(), e.getValue()); 227 210 } 228 for (final Entry<String,String> e : override.entrySet())229 if (e.getKey().startsWith(prefix))230 if (e.getValue() == null) {231 all.remove(e.getKey());232 } else {233 all.put(e.getKey(), e.getValue());234 }235 211 return all; 236 212 } … … 255 231 all.put(e.getKey().substring(6), e.getValue()); 256 232 } 257 for (final Entry<String,String> e : override.entrySet())258 if (e.getKey().startsWith("color."))259 if (e.getValue() == null) {260 all.remove(e.getKey().substring(6));261 } else {262 all.put(e.getKey().substring(6), e.getValue());263 }264 233 return all; 265 234 } … … 279 248 synchronized public boolean getBoolean(final String key) { 280 249 putDefault(key, null); 281 if (override.containsKey(key))282 return override.get(key) == null ? false : Boolean.parseBoolean(override.get(key));283 250 return properties.containsKey(key) ? Boolean.parseBoolean(properties.get(key)) : false; 284 251 } … … 286 253 synchronized public boolean getBoolean(final String key, final boolean def) { 287 254 putDefault(key, Boolean.toString(def)); 288 if (override.containsKey(key))289 return override.get(key) == null ? def : Boolean.parseBoolean(override.get(key));290 255 return properties.containsKey(key) ? Boolean.parseBoolean(properties.get(key)) : def; 291 256 } 292 257 293 258 public boolean put(final String key, String value) { 294 295 259 boolean changed = false; 296 260 String oldValue = null; … … 319 283 if (changed) { 320 284 // Call outside of synchronized section in case some listener wait for other thread that wait for preference lock 321 firePrefrenceChanged(key, oldValue, value); 285 firePreferenceChanged(key, oldValue, value); 322 286 } 323 287 return changed; … … 664 628 Collection<Collection<String>> col = new LinkedList<Collection<String>>(); 665 629 for(int num = 0; ; ++num) { 666 Collection<String> c = getCollection(key+"."+num ++, null);630 Collection<String> c = getCollection(key+"."+num, null); 667 631 if(c == null) 668 632 break; … … 675 639 synchronized public boolean putArray(String key, Collection<Collection<String>> val) { 676 640 boolean res = true; 677 for(String k :getAllPrefix(key+ ".").keySet())678 put(k, null);641 Collection<String> keys = getAllPrefix(key).keySet(); 642 key += "."; 679 643 if(val != null) { 680 644 String s = null; 681 645 int num = 0; 682 646 for(Collection<String> c : val) { 683 if(!putCollection(key+"."+num++, c)) 647 keys.remove(key+num); 648 if(!putCollection(key+num++, c)) 684 649 res = false; 650 } 651 } 652 int l = key.length(); 653 for(String k : keys) { 654 try { 655 Integer.valueOf(k.substring(l)); 656 put(k, null); 657 } catch(Exception e) { 685 658 } 686 659 } -
trunk/src/org/openstreetmap/josm/data/conflict/Conflict.java
r3083 r3530 52 52 * Replies true if the primitive <code>primitive</code> is participating 53 53 * in this conflict 54 * 54 * 55 55 * @param primitive the primitive 56 56 * @return true if the primitive <code>primitive</code> is participating … … 66 66 * Replies true if the primitive with id <code>id</code> is participating 67 67 * in this conflict 68 * 68 * 69 69 * @param id the primitive id 70 70 * @return true if the primitive <code>primitive</code> is participating … … 104 104 105 105 /** 106 * 106 * 107 107 * @return True if my primitive was deleted but it has set non deleted status because it's referred by another 108 108 * primitive and references to deleted primitives are not allowed. -
trunk/src/org/openstreetmap/josm/data/coor/CoordinateFormat.java
r3438 r3530 19 19 */ 20 20 DEGREES_MINUTES_SECONDS (tr("deg\u00B0 min'' sec\"")), 21 21 22 22 /** 23 * the nautical format 23 * the nautical format 24 24 */ 25 25 NAUTICAL (tr("deg\u00B0 min'' (Nautical)")), 26 26 27 27 /** 28 28 * coordinates East/North -
trunk/src/org/openstreetmap/josm/data/oauth/OAuthToken.java
r3083 r3530 10 10 /** 11 11 * Creates an OAuthToken from the token currently managed by the {@see OAuthConsumer}. 12 * 12 * 13 13 * @param consumer the consumer 14 14 * @return the token … … 23 23 /** 24 24 * Creates a new token 25 * 25 * 26 26 * @param key the token key 27 27 * @param secret the token secret … … 34 34 /** 35 35 * Creates a clone of another token 36 * 36 * 37 37 * @param other the other token. Must not be null. 38 38 * @throws IllegalArgumentException thrown if other is null … … 46 46 /** 47 47 * Replies the token key 48 * 48 * 49 49 * @return the token key 50 50 */ … … 55 55 /** 56 56 * Replies the token secret 57 * 57 * 58 58 * @return the token secret 59 59 */ -
trunk/src/org/openstreetmap/josm/data/osm/Storage.java
r3504 r3530 175 175 } 176 176 177 @Override 177 @Override 178 178 public synchronized boolean add(T t) { 179 179 T orig = putUnique(t); … … 187 187 return tOrig != null; 188 188 } 189 189 190 190 @Override 191 191 public synchronized void clear() { -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSetListener.java
r3083 r3530 8 8 * Fired by a {@see HistoryDataSet} if the cached history of an OSM primitive with 9 9 * id <code>id</code> is updated 10 * 10 * 11 11 * @param source the data set firing the event 12 12 * @param id the id of the updated primitive … … 16 16 /** 17 17 * Fired by a {@see HistoryDataSet} if the history cached is cleared. 18 * 18 * 19 19 * @param source the history data set firing the event 20 20 */ -
trunk/src/org/openstreetmap/josm/data/projection/Ellipsoid.java
r3473 r3530 196 196 return new LatLon(Math.toDegrees(lt), Math.toDegrees(lg)); 197 197 } 198 198 199 199 /** 200 200 * convert ellipsoidal coordinates to cartesian coordinates … … 212 212 XYZ[1] = Rn * Math.cos(phi) * Math.sin(lambda); 213 213 XYZ[2] = Rn * (1 - e2) * Math.sin(phi); 214 214 215 215 return XYZ; 216 216 } -
trunk/src/org/openstreetmap/josm/gui/GettingStarted.java
r3171 r3530 105 105 // clear the build-in command ctrl+shift+O, because it is used as shortcut in JOSM 106 106 lg.getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_O, InputEvent.SHIFT_MASK | InputEvent.CTRL_MASK), "none"); 107 107 108 108 JScrollPane scroller = new JScrollPane(lg); 109 109 scroller.setViewportBorder(new EmptyBorder(10, 100, 10, 100)); -
trunk/src/org/openstreetmap/josm/gui/MapScaler.java
r3406 r3530 17 17 18 18 private final NavigatableComponent mv; 19 19 20 20 private static int PADDING_RIGHT = 100; 21 21 22 22 public MapScaler(NavigatableComponent mv) { 23 23 this.mv = mv; -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java
r3083 r3530 115 115 116 116 /** 117 * 117 * 118 118 * @param entry 119 119 * @return Primitive from my dataset referenced by entry -
trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java
r3211 r3530 178 178 } 179 179 } 180 180 181 181 /** 182 * If we add additional dialogs on startup (e.g. geoimage), they may 182 * If we add additional dialogs on startup (e.g. geoimage), they may 183 183 * not have an actual height yet. 184 184 * In this case we simply reset everything to it's preferred size. -
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r3202 r3530 518 518 /** 519 519 * Action for downloading incomplete members of selected relations 520 * 520 * 521 521 */ 522 522 class DownloadSelectedIncompleteMembersAction extends AbstractAction implements ListSelectionListener{ … … 672 672 /** 673 673 * Replies the list of selected relations with incomplete members 674 * 674 * 675 675 * @return the list of selected relations with incomplete members 676 676 */ -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java
r3083 r3530 42 42 /** 43 43 * This panel allows to specify a changeset query 44 * 44 * 45 45 */ 46 46 public class AdvancedChangesetQueryPanel extends JPanel { … … 191 191 /** 192 192 * Builds the changeset query based on the data entered in the form. 193 * 193 * 194 194 * @return the changeset query. null, if the data entered doesn't represent 195 195 * a valid changeset query. … … 368 368 * This is the panel for selecting whether the query should be restricted to a specific 369 369 * user 370 * 370 * 371 371 */ 372 372 static private class UserRestrictionPanel extends JPanel { … … 509 509 * Sets the query restrictions on <code>query</code> for changeset owner based 510 510 * restrictions. 511 * 511 * 512 512 * @param query the query. Must not be null. 513 513 * @throws IllegalArgumentException thrown if query is null 514 514 * @throws IllegalStateException thrown if one of the available values for query parameters in 515 515 * this panel isn't valid 516 * 516 * 517 517 */ 518 518 public void fillInQuery(ChangesetQuery query) throws IllegalStateException, IllegalArgumentException { … … 961 961 /** 962 962 * Validator for user ids entered in in a {@see JTextComponent}. 963 * 963 * 964 964 */ 965 965 static private class UidInputFieldValidator extends AbstractTextComponentValidator { … … 1038 1038 * Validates dates entered as text in in a {@see JTextComponent}. Validates the input 1039 1039 * on the fly and gives feedback about whether the date is valid or not. 1040 * 1040 * 1041 1041 * Dates can be entered in one of four standard formats defined for the current locale. 1042 1042 */ … … 1101 1101 * Validates time values entered as text in in a {@see JTextComponent}. Validates the input 1102 1102 * on the fly and gives feedback about whether the time value is valid or not. 1103 * 1103 * 1104 1104 * Time values can be entered in one of four standard formats defined for the current locale. 1105 1105 */ -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanel.java
r3132 r3530 28 28 /** 29 29 * This panel presents a list of basic queries for changests. 30 * 30 * 31 31 */ 32 32 public class BasicChangesetQueryPanel extends JPanel { … … 242 242 /** 243 243 * Responds to changes in the selected query 244 * 244 * 245 245 */ 246 246 class SelectQueryHandler implements ItemListener { -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryDialog.java
r3501 r3530 33 33 /** 34 34 * This is a modal dialog for entering query criteria to search for changesets. 35 * 35 * 36 36 */ 37 37 public class ChangesetQueryDialog extends JDialog { -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryTask.java
r3083 r3530 49 49 /** 50 50 * Creates the task. 51 * 51 * 52 52 * @param query the query to submit to the OSM server. Must not be null. 53 53 * @throws IllegalArgumentException thrown if query is null. … … 61 61 /** 62 62 * Creates the task. 63 * 63 * 64 64 * @param parent the parent component relative to which the {@see PleaseWaitDialog} is displayed. 65 65 * Must not be null. … … 130 130 /** 131 131 * Tries to fully identify the current JOSM user 132 * 132 * 133 133 * @throws OsmTransferException thrown if something went wrong 134 134 */ -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java
r3083 r3530 142 142 * Replies the {@see ChangesetQuery} specified in this panel. null, if no valid changeset query 143 143 * is specified. 144 * 144 * 145 145 * @return the changeset query 146 146 */ -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationMemberTask.java
r3362 r3530 56 56 * Creates a download task for downloading the child primitives {@code children} for all parent 57 57 * relations in {@code parents}. 58 * 58 * 59 59 * @param parents the collection of parent relations 60 60 * @param children the collection of child primitives to download -
trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java
r3527 r3530 89 89 gc.insets = new Insets(5,5,5,5); 90 90 pnl.add(lblCurrentDownloadArea = new JMultilineLabel(""), gc); 91 91 92 92 gc.weightx = 1.0; 93 93 gc.weighty = 1.0; -
trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java
r3399 r3530 84 84 /** 85 85 * Creates the panel 86 * 86 * 87 87 * @param changesetCommentModel the model for the changeset comment. Must not be null 88 88 * @throws IllegalArgumentException thrown if {@code changesetCommentModel} is null -
trunk/src/org/openstreetmap/josm/gui/io/ChangesetManagementPanel.java
r3133 r3530 163 163 /** 164 164 * Creates a new panel 165 * 165 * 166 166 * @param changesetCommentModel the changeset comment model. Must not be null. 167 167 * @throws IllegalArgumentException thrown if {@code changesetCommentModel} is null … … 186 186 /** 187 187 * Sets the changeset to be used in the next upload 188 * 188 * 189 189 * @param cs the changeset 190 190 */ -
trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
r3501 r3530 364 364 /** 365 365 * returns true if the user wants to revisit, false if they 366 * want to continue 366 * want to continue 367 367 */ 368 368 protected boolean warnUploadComment() { … … 370 370 tr("Please revise upload comment"), 371 371 new String[] {tr("Revise"), tr("Cancel"), tr("Continue as is")}); 372 dlg.setContent("<html>" + 373 tr("Your upload comment is <i>empty</i>, or <i>very short</i>.<br /><br />" + 372 dlg.setContent("<html>" + 373 tr("Your upload comment is <i>empty</i>, or <i>very short</i>.<br /><br />" + 374 374 "This is technically allowed, but please consider that many users who are<br />" + 375 375 "watching changes in their area depend on meaningful changeset comments<br />" + 376 376 "to understand what is going on!<br /><br />" + 377 377 "If you spend a minute now to explain your change, you will make life<br />" + 378 "easier for many other mappers.") + 378 "easier for many other mappers.") + 379 379 "</html>"); 380 380 dlg.setButtonIcons(new Icon[] { … … 382 382 ImageProvider.get("cancel"), 383 383 ImageProvider.overlay( 384 ImageProvider.get("upload"), 384 ImageProvider.get("upload"), 385 385 new ImageIcon(ImageProvider.get("warning-small").getImage().getScaledInstance(10 , 10, Image.SCALE_SMOOTH)), 386 386 ImageProvider.OverlayPosition.SOUTHEAST)}); -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java
r3261 r3530 112 112 void setExifImgDir(double exifDir) { 113 113 this.exifImgDir = exifDir; 114 } 114 } 115 115 116 116 @Override -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
r3396 r3530 175 175 this.textMap.putAll(textMap); 176 176 } 177 177 178 178 this.text = null; 179 179 this.offset = offset; -
trunk/src/org/openstreetmap/josm/gui/oauth/AbstractAuthorizationUI.java
r3083 r3530 10 10 /** 11 11 * This is the abstract base class for the three authorisation UIs. 12 * 13 * 12 * 13 * 14 14 */ 15 15 public abstract class AbstractAuthorizationUI extends VerticallyScrollablePanel{ … … 34 34 * Replies the URL of the OSM API for which this UI is currently trying to retrieve an OAuth 35 35 * Access Token 36 * 36 * 37 37 * @return the API URL 38 38 */ … … 44 44 * Sets the URL of the OSM API for which this UI is currently trying to retrieve an OAuth 45 45 * Access Token 46 * 46 * 47 47 * @param apiUrl the api URL 48 48 */ … … 53 53 /** 54 54 * Replies the panel for entering advanced OAuth parameters (see {@see OAuthParameters}) 55 * 55 * 56 56 * @return the panel for entering advanced OAuth parameters 57 57 * @see #getOAuthParameters() … … 63 63 /** 64 64 * Replies the current set of advanced OAuth parameters in this UI 65 * 65 * 66 66 * @return the current set of advanced OAuth parameters in this UI 67 67 */ … … 72 72 /** 73 73 * Replies the retrieved Access Token. null, if no Access Token was retrieved. 74 * 74 * 75 75 * @return the retrieved Access Token 76 76 */ … … 82 82 * Sets the current Access Token. This will fire a property change event for {@see #ACCESS_TOKEN_PROP} 83 83 * if the access token has changed 84 * 84 * 85 85 * @param accessToken the new access token. null, to clear the current access token 86 86 */ … … 99 99 /** 100 100 * Replies true if this UI currently has an Access Token 101 * 101 * 102 102 * @return true if this UI currently has an Access Token 103 103 */ … … 109 109 * Replies whether the user has chosen to save the Access Token in the JOSM 110 110 * preferences or not. 111 * 111 * 112 112 * @return true if the user has chosen to save the Access Token 113 113 */ … … 116 116 /** 117 117 * Initializes the authorisation UI with preference values in <code>pref</code>. 118 * 118 * 119 119 * @param pref the preferences. Must not be null. 120 120 * @throws IllegalArgumentException thrown if pref is null -
trunk/src/org/openstreetmap/josm/gui/oauth/AccessTokenInfoPanel.java
r3083 r3530 18 18 /** 19 19 * Displays the key and the secret of an OAuth Access Token. 20 * 20 * 21 21 */ 22 22 public class AccessTokenInfoPanel extends JPanel { … … 81 81 /** 82 82 * Displays the key and secret in <code>token</code>. 83 * 83 * 84 84 * @param token the access token. If null, the content in the info panel is cleared 85 85 */ -
trunk/src/org/openstreetmap/josm/gui/oauth/AdvancedOAuthPropertiesPanel.java
r3083 r3530 171 171 /** 172 172 * Replies the OAuth parameters currently edited in this properties panel. 173 * 173 * 174 174 * @return the OAuth parameters 175 175 */ … … 188 188 /** 189 189 * Sets the advanced parameters to be displayed 190 * 190 * 191 191 * @param parameters the advanced parameters. Must not be null. 192 192 * @throws IllegalArgumentException thrown if parameters is null. … … 214 214 /** 215 215 * Initializes the panel from the values in the preferences <code>preferences</code>. 216 * 216 * 217 217 * @param pref the preferences. Must not be null. 218 218 * @throws IllegalArgumentException thrown if pref is null … … 238 238 /** 239 239 * Remembers the current values in the preferences <code>pref</code>. 240 * 240 * 241 241 * @param pref the preferences. Must not be null. 242 242 * @throws IllegalArgumentException thrown if pref is null. -
trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java
r3083 r3530 52 52 * This is an UI which supports a JOSM user to get an OAuth Access Token in a fully 53 53 * automatic process. 54 * 54 * 55 55 */ 56 56 public class FullyAutomaticAuthorizationUI extends AbstractAuthorizationUI { … … 68 68 /** 69 69 * Builds the panel with the three privileges the user can grant JOSM 70 * 70 * 71 71 * @return 72 72 */ … … 78 78 /** 79 79 * Builds the panel for entering the username and password 80 * 80 * 81 81 * @return 82 82 */ … … 203 203 /** 204 204 * Builds the panel with the action button for starting the authorisation 205 * 205 * 206 206 * @return 207 207 */ … … 218 218 /** 219 219 * Builds the panel which displays the generated Access Token. 220 * 220 * 221 221 * @return 222 222 */ … … 274 274 * Prepares the UI for the first step in the automatic process: entering the authentication 275 275 * and authorisation parameters. 276 * 276 * 277 277 */ 278 278 protected void prepareUIForEnteringRequest() { … … 290 290 /** 291 291 * Prepares the UI for the second step in the automatic process: displaying the access token 292 * 292 * 293 293 */ 294 294 protected void prepareUIForResultDisplay() { -
trunk/src/org/openstreetmap/josm/gui/oauth/OsmPrivilegesPanel.java
r3083 r3530 85 85 /** 86 86 * Replies the currently entered privileges 87 * 87 * 88 88 * @return the privileges 89 89 */ -
trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveAccessTokenTask.java
r3083 r3530 21 21 /** 22 22 * Asynchronous task for retrieving an Access Token. 23 * 23 * 24 24 */ 25 25 public class RetrieveAccessTokenTask extends PleaseWaitRunnable { … … 34 34 /** 35 35 * Creates the task 36 * 36 * 37 37 * @param parent the parent component relative to which the {@see PleaseWaitRunnable}-Dialog 38 38 * is displayed … … 99 99 /** 100 100 * Replies true if the task was canceled. 101 * 101 * 102 102 * @return 103 103 */ … … 108 108 /** 109 109 * Replies the retrieved Access Token. null, if something went wrong. 110 * 110 * 111 111 * @return the retrieved Access Token 112 112 */ -
trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveRequestTokenTask.java
r3083 r3530 32 32 /** 33 33 * Creates the task 34 * 34 * 35 35 * @param parent the parent component relative to which the {@see PleaseWaitRunnable}-Dialog 36 36 * is displayed … … 93 93 /** 94 94 * Replies true if the task was canceled 95 * 95 * 96 96 * @return true if the task was canceled 97 97 */ … … 102 102 /** 103 103 * Replies the request token. null, if something went wrong. 104 * 104 * 105 105 * @return the request token 106 106 */ -
trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java
r3083 r3530 34 34 /** 35 35 * This is the UI for running a semic-automic authorisation procedure. 36 * 36 * 37 37 * In contrast to the fully-automatic procedure the user is dispatched to an 38 38 * external browser for login and authorisation. -
trunk/src/org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java
r3083 r3530 35 35 /** 36 36 * Checks whether an OSM API server can be accessed with a specific Access Token. 37 * 37 * 38 38 * It retrieves the user details for the user which is authorized to access the server with 39 39 * this token. 40 * 40 * 41 41 */ 42 42 public class TestAccessTokenTask extends PleaseWaitRunnable { … … 50 50 /** 51 51 * Create the task 52 * 52 * 53 53 * @param parent the parent component relative to which the {@see PleaseWaitRunnable}-Dialog is displayed 54 54 * @param apiUrl the API URL. Must not be null. -
trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java
r3113 r3530 222 222 /** 223 223 * Replies the list of plugins waiting for update or download 224 * 224 * 225 225 * @return the list of plugins waiting for update or download 226 226 */ … … 246 246 * Scans cached plugin lists from plugin download sites and locally available 247 247 * plugin jar files. 248 * 248 * 249 249 */ 250 250 public void readLocalPluginInformation() { -
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferencesModel.java
r3090 r3530 87 87 * Updates the list of plugin information objects with new information from 88 88 * plugin update sites. 89 * 89 * 90 90 * @param fromPluginSite plugin information read from plugin update sites 91 91 */ … … 111 111 /** 112 112 * Replies the list of selected plugin information objects 113 * 113 * 114 114 * @return the list of selected plugin information objects 115 115 */ … … 129 129 /** 130 130 * Replies the list of selected plugin information objects 131 * 131 * 132 132 * @return the list of selected plugin information objects 133 133 */ … … 158 158 /** 159 159 * Replies the list of plugin informations to display 160 * 160 * 161 161 * @return the list of plugin informations to display 162 162 */ … … 168 168 /** 169 169 * Replies the list of plugins waiting for update or download 170 * 170 * 171 171 * @return the list of plugins waiting for update or download 172 172 */ … … 185 185 /** 186 186 * Sets whether the plugin is selected or not. 187 * 187 * 188 188 * @param name the name of the plugin 189 189 * @param selected true, if selected; false, otherwise … … 205 205 * Removes all the plugin in {@code plugins} from the list of plugins 206 206 * with a pending download 207 * 207 * 208 208 * @param plugins the list of plugins to clear for a pending download 209 209 */ … … 218 218 * Replies the plugin info with the name <code>name</code>. null, if no 219 219 * such plugin info exists. 220 * 220 * 221 221 * @param name the name. If null, replies null. 222 222 * @return the plugin info. … … 251 251 * Replies true if the plugin with name <code>name</code> is currently 252 252 * selected in the plugin model 253 * 253 * 254 254 * @param name the plugin name 255 255 * @return true if the plugin is selected; false, otherwise … … 265 265 * Replies the set of plugins which have been added by the user to 266 266 * the set of activated plugins. 267 * 267 * 268 268 * @return the set of newly deactivated plugins 269 269 */ … … 283 283 * Replies the set of plugins which have been removed by the user from 284 284 * the set of activated plugins. 285 * 285 * 286 286 * @return the set of newly deactivated plugins 287 287 */ … … 302 302 * Replies the set of plugin names which have been added by the user to 303 303 * the set of activated plugins. 304 * 304 * 305 305 * @return the set of newly activated plugin names 306 306 */ … … 318 318 * in this preference model. He has either added plugins or removed plugins 319 319 * being active before. 320 * 320 * 321 321 * @return true if the collection of active plugins has changed 322 322 */ … … 329 329 * Refreshes the local version field on the plugins in <code>plugins</code> with 330 330 * the version in the manifest of the downloaded "jar.new"-file for this plugin. 331 * 331 * 332 332 * @param plugins the collections of plugins to refresh 333 333 */ -
trunk/src/org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTask.java
r3083 r3530 26 26 * It tries to retrieve a list of changesets from the given URL. If it succeeds, the method 27 27 * {@see #isSuccess()} replies true, otherwise false. 28 * 28 * 29 29 * Note: it fetches a list of changesets instead of the much smaller capabilities because - strangely enough - 30 30 * an OSM server "http://x.y.y/api/0.6" not only responds to "http://x.y.y/api/0.6/capabilities" but also 31 31 * to "http://x.y.y/api/0/capabilities" or "http://x.y.y/a/capabilities" with valid capabilities. If we get 32 32 * valid capabilities with an URL we therefore can't be sure that the base URL is valid API URL. 33 * 33 * 34 34 */ 35 35 public class ApiUrlTestTask extends PleaseWaitRunnable{ … … 43 43 /** 44 44 * Creates the task 45 * 45 * 46 46 * @param parent the parent component relative to which the {@see PleaseWaitRunnable}-Dialog is displayed 47 47 * @param url the url. Must not be null. … … 151 151 * Removes leading and trailing whitespace from the API URL and removes trailing 152 152 * '/'. 153 * 153 * 154 154 * @return the normalized API URL 155 155 */ -
trunk/src/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferencesPanel.java
r3083 r3530 25 25 * This is the preference panel for the authentication method and the authentication 26 26 * parameters. 27 * 27 * 28 28 */ 29 29 public class AuthenticationPreferencesPanel extends VerticallyScrollablePanel implements PropertyChangeListener{ -
trunk/src/org/openstreetmap/josm/gui/preferences/server/BasicAuthenticationPreferencesPanel.java
r3083 r3530 28 28 * The preferences panel for parameters necessary for the Basic Authentication 29 29 * Scheme. 30 * 30 * 31 31 */ 32 32 public class BasicAuthenticationPreferencesPanel extends JPanel { -
trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAccessTokenHolder.java
r3083 r3530 41 41 /** 42 42 * Sets whether the current access token should be saved to the preferences file. 43 * 43 * 44 44 * If true, the access token is saved in clear text to the preferences file. The same 45 45 * access token can therefore be used in multiple JOSM sessions. 46 * 46 * 47 47 * If false, the access token isn't saved to the preferences file. If JOSM is closed, 48 48 * the access token is lost and new token has to be generated by the OSM server the 49 49 * next time JOSM is used. 50 * 50 * 51 51 * @param saveToPreferences 52 52 */ … … 57 57 /** 58 58 * Replies the access token key. null, if no access token key is currently set. 59 * 59 * 60 60 * @return the access token key 61 61 */ … … 66 66 /** 67 67 * Sets the access token key. Pass in null to remove the current access token key. 68 * 68 * 69 69 * @param accessTokenKey the access token key 70 70 */ … … 75 75 /** 76 76 * Replies the access token secret. null, if no access token secret is currently set. 77 * 77 * 78 78 * @return the access token secret 79 79 */ … … 84 84 /** 85 85 * Sets the access token secret. Pass in null to remove the current access token secret. 86 * 86 * 87 87 * @param accessTokenSecret 88 88 */ … … 99 99 /** 100 100 * Sets the access token hold by this holder. 101 * 101 * 102 102 * @param accessTokenKey the access token key 103 103 * @param accessTokenSecret the access token secret … … 110 110 /** 111 111 * Sets the access token hold by this holder. 112 * 112 * 113 113 * @param token the access token. Can be null to clear the content in this holder. 114 114 */ … … 126 126 * Replies true if this holder contains an complete access token, consisting of an 127 127 * Access Token Key and an Access Token Secret. 128 * 128 * 129 129 * @return true if this holder contains an complete access token 130 130 */ … … 136 136 * Initializes the content of this holder from the Access Token managed by the 137 137 * credential manager. 138 * 138 * 139 139 * @param pref the preferences. Must not be null. 140 140 * @param cm the credential manager. Must not be null. … … 162 162 * Saves the content of this holder to the preferences and a credential store managed 163 163 * by a credential manager. 164 * 164 * 165 165 * @param preferences the preferences. Must not be null. 166 166 * @param cm the credentials manager. Must not be null. -
trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAuthenticationPreferencesPanel.java
r3083 r3530 40 40 * showing the current Access Token Key and Access Token Secret, if the 41 41 * user already has an Access Token. 42 * 42 * 43 43 * For initial authorisation see {@see OAuthAuthorisationWizard}. 44 * 44 * 45 45 */ 46 46 public class OAuthAuthenticationPreferencesPanel extends JPanel implements PropertyChangeListener { … … 58 58 /** 59 59 * Builds the panel for entering the advanced OAuth parameters 60 * 60 * 61 61 * @return 62 62 */ … … 172 172 * The preferences panel displayed if there is currently no Access Token available. 173 173 * This means that the user didn't run through the OAuth authorisation procedure yet. 174 * 174 * 175 175 */ 176 176 private class NotYetAuthorisedPanel extends JPanel { … … 209 209 /** 210 210 * The preferences panel displayed if there is currently an AccessToken available. 211 * 211 * 212 212 */ 213 213 private class AlreadyAuthorisedPanel extends JPanel { -
trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java
r3083 r3530 86 86 /** 87 87 * Builds the panel for the HTTP proxy configuration 88 * 88 * 89 89 * @return 90 90 */ … … 162 162 /** 163 163 * Builds the panel for the SOCKS proxy configuration 164 * 164 * 165 165 * @return 166 166 */ -
trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java
r3214 r3530 439 439 /** 440 440 * Inject a tag cell editor in the tag table 441 * 441 * 442 442 * @param editor 443 443 */ … … 543 543 * This is a custom implementation of the CellEditorRemover used in JTable 544 544 * to handle the client property <tt>terminateEditOnFocusLost</tt>. 545 * 545 * 546 546 * This implementation also checks whether focus is transferred to one of a list 547 547 * of dedicated components, see {@see TagTable#doNotStopCellEditingWhenFocused}. -
trunk/src/org/openstreetmap/josm/gui/util/RedirectInputMap.java
r3502 r3530 66 66 redirect(source, target); 67 67 } 68 68 69 69 public static void redirect(JComponent source, JComponent target) { 70 70 InputMap lastParent = source.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW); -
trunk/src/org/openstreetmap/josm/plugins/Plugin.java
r3070 r3530 48 48 /** 49 49 * Creates the plugin 50 * 50 * 51 51 * @param info the plugin information describing the plugin. 52 52 */ … … 57 57 /** 58 58 * Replies the plugin information object for this plugin 59 * 59 * 60 60 * @return the plugin information object 61 61 */ … … 66 66 /** 67 67 * Sets the plugin information object for this plugin 68 * 68 * 69 69 * @parma info the plugin information object 70 70 */ … … 76 76 * @return The directory for the plugin to store all kind of stuff. 77 77 */ 78 public finalString getPluginDir() {78 public String getPluginDir() { 79 79 return new File(Main.pref.getPluginsDirectory(), info.name).getPath(); 80 80 } … … 103 103 */ 104 104 public void copy(String from, String to) throws FileNotFoundException, IOException { 105 String pluginDirName = Main.pref.getPluginsDirectory() + "/" + info.name + "/";105 String pluginDirName = getPluginDir(); 106 106 File pluginDir = new File(pluginDirName); 107 107 if (!pluginDir.exists()) { 108 108 pluginDir.mkdirs(); 109 109 } 110 FileOutputStream out = new FileOutputStream(pluginDirName +to);110 FileOutputStream out = new FileOutputStream(new File(pluginDirName, to)); 111 111 InputStream in = getClass().getResourceAsStream(from); 112 112 byte[] buffer = new byte[8192]; -
trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java
r3332 r3530 29 29 /** 30 30 * Asynchronous task for downloading a collection of plugins. 31 * 31 * 32 32 * When the task is finished {@see #getDownloadedPlugins()} replies the list of downloaded plugins 33 33 * and {@see #getFailedPlugins()} replies the list of failed plugins. 34 * 34 * 35 35 */ 36 36 public class PluginDownloadTask extends PleaseWaitRunnable{ … … 47 47 /** 48 48 * Creates the download task 49 * 49 * 50 50 * @param parent the parent component relative to which the {@see PleaseWaitDialog} is displayed 51 51 * @param toUpdate a collection of plugin descriptions for plugins to update/download. Must not be null. … … 61 61 /** 62 62 * Creates the task 63 * 63 * 64 64 * @param monitor a progress monitor. Defaults to {@see NullProgressMonitor#INSTANCE} if null 65 65 * @param toUpdate a collection of plugin descriptions for plugins to update/download. Must not be null. … … 75 75 /** 76 76 * Sets the collection of plugins to update. 77 * 77 * 78 78 * @param toUpdate the collection of plugins to update. Must not be null. 79 79 * @throws IllegalArgumentException thrown if toUpdate is null … … 190 190 /** 191 191 * Replies true if the task was cancelled by the user 192 * 192 * 193 193 * @return 194 194 */ … … 199 199 /** 200 200 * Replies the list of successfully downloaded plugins 201 * 201 * 202 202 * @return the list of successfully downloaded plugins 203 203 */ … … 208 208 /** 209 209 * Replies the list of plugins whose download has failed 210 * 210 * 211 211 * @return the list of plugins whose download has failed 212 212 */ -
trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
r3331 r3530 58 58 * Creates a plugin information object by reading the plugin information from 59 59 * the manifest in the plugin jar. 60 * 60 * 61 61 * The plugin name is derived from the file name. 62 * 62 * 63 63 * @param file the plugin jar file 64 64 * @throws PluginException if reading the manifest fails … … 101 101 * Creates a plugin information object by reading plugin information in Manifest format 102 102 * from the input stream {@code manifestStream}. 103 * 103 * 104 104 * @param manifestStream the stream to read the manifest from 105 105 * @param name the plugin name … … 125 125 * plugin information in a plugin information object retrieved from a plugin 126 126 * update site. 127 * 127 * 128 128 * @param other the plugin information object retrieved from the update 129 129 * site … … 227 227 * Replies the description as HTML document, including a link to a web page with 228 228 * more information, provided such a link is available. 229 * 229 * 230 230 * @return the description as HTML document 231 231 */ … … 243 243 /** 244 244 * Load and instantiate the plugin 245 * 245 * 246 246 * @param the plugin class 247 247 * @return the instantiated and initialized plugin … … 265 265 /** 266 266 * Load the class of the plugin 267 * 267 * 268 268 * @param classLoader the class loader to use 269 269 * @return the loaded class … … 356 356 * Replies true if the plugin with the given information is most likely outdated with 357 357 * respect to the referenceVersion. 358 * 358 * 359 359 * @param referenceVersion the reference version. Can be null if we don't know a 360 360 * reference version 361 * 361 * 362 362 * @return true, if the plugin needs to be updated; false, otherweise 363 363 */ … … 375 375 * it is not available locally (its local version is null) or its local version is 376 376 * older than the available version on the server. 377 * 377 * 378 378 * @return true if the plugin should be updated 379 379 */ … … 393 393 * Replies true if either the name, the description, or the version match (case insensitive) 394 394 * one of the words in filter. Replies true if filter is null. 395 * 395 * 396 396 * @param filter the filter expression 397 397 * @return true if this plugin info matches with the filter -
trunk/src/org/openstreetmap/josm/plugins/PluginListParser.java
r3083 r3530 15 15 /** 16 16 * A parser for the plugin list provided by a JOSM Plugin Download Site. 17 * 17 * 18 18 * See <a href="http://josm.openstreetmap.de/plugin">http://josm.openstreetmap.de/plugin</a> 19 19 * for a sample of the document. The format is a custom format, kind of mix of CSV and RFC822 style … … 25 25 /** 26 26 * Creates the plugin information object 27 * 27 * 28 28 * @param name the plugin name 29 29 * @param url the plugin download url … … 48 48 /** 49 49 * Parses a plugin information document and replies a list of plugin information objects. 50 * 50 * 51 51 * See <a href="http://josm.openstreetmap.de/plugin">http://josm.openstreetmap.de/plugin</a> 52 52 * for a sample of the document. The format is a custom format, kind of mix of CSV and RFC822 style 53 53 * name/value-pairs. 54 * 54 * 55 55 * @param in the input stream from which to parse 56 56 * @return the list of plugin information objects -
trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java
r3331 r3530 23 23 * This is an asynchronous task for reading plugin information from the files 24 24 * in the local plugin repositories. 25 * 25 * 26 26 * It scans the files in the local plugins repository (see {@see Preferences#getPluginsDirectory()} 27 27 * and extracts plugin information from three kind of files: … … 231 231 /** 232 232 * Replies information about available plugins detected by this task. 233 * 233 * 234 234 * @return information about available plugins detected by this task. 235 235 */ … … 240 240 /** 241 241 * Replies true if the task was cancelled by the user 242 * 242 * 243 243 * @return true if the task was cancelled by the user 244 244 */ -
trunk/src/org/openstreetmap/josm/tools/I18n.java
r3461 r3530 106 106 "GTKColorChooserPanel.saturationText", 107 107 "GTKColorChooserPanel.valueText", 108 108 109 109 /* JOptionPane */ 110 110 "OptionPane.okButtonText", … … 144 144 /** 145 145 * Provide translation in a context. 146 * There can be different translations for the same text (but 146 * There can be different translations for the same text (but 147 147 * different context). 148 148 *
Note:
See TracChangeset
for help on using the changeset viewer.