Changeset 8444 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2015-06-02T16:41:37+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/imagery/HTMLGrabber.java
r7132 r8444 38 38 } 39 39 40 ProcessBuilder builder = new ProcessBuilder( 40 ProcessBuilder builder = new ProcessBuilder(cmdParams); 41 41 42 42 Process browser; -
trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java
r8404 r8444 153 153 154 154 public static int random(int min, int max) { 155 return (int)(Math.random() * ((max+1)-min) 155 return (int)(Math.random() * ((max+1)-min)) + min; 156 156 } 157 157 … … 268 268 String contentType = conn.getHeaderField("Content-Type"); 269 269 if (conn.getResponseCode() != 200 270 || contentType != null && !contentType.startsWith("image") 270 || contentType != null && !contentType.startsWith("image")) { 271 271 String xml = readException(conn); 272 272 try { … … 302 302 try (BufferedReader br = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8))) { 303 303 String line = null; 304 while ((line = br.readLine()) != null) {304 while ((line = br.readLine()) != null) { 305 305 // filter non-ASCII characters and control characters 306 306 exception.append(line.replaceAll("[^\\p{Print}]", "")); -
trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java
r8379 r8444 117 117 */ 118 118 public AddTagsDialog(String[][] tags, String senderName, Collection<? extends OsmPrimitive> primitives) { 119 super(Main.parent, tr("Add tags to selected objects"), new String[] { tr("Add selected tags"), tr("Add all tags"),tr("Cancel")},119 super(Main.parent, tr("Add tags to selected objects"), new String[] {tr("Add selected tags"), tr("Add all tags"), tr("Cancel")}, 120 120 false, 121 121 true); … … 213 213 if (!sender.isEmpty() && !trustedSenders.contains(sender)) { 214 214 final JCheckBox c = new JCheckBox(); 215 c.setAction(new AbstractAction(tr("Accept all tags from {0} for this session", sender) 215 c.setAction(new AbstractAction(tr("Accept all tags from {0} for this session", sender)) { 216 216 @Override public void actionPerformed(ActionEvent e) { 217 217 if (c.isSelected()) … … 220 220 trustedSenders.remove(sender); 221 221 } 222 } 222 }); 223 223 tablePanel.add(c , GBC.eol().insets(20,10,0,0)); 224 224 } … … 274 274 for (String tag : tagSet) { 275 275 // support a = b===c as "a"="b===c" 276 String 276 String[] pair = tag.split("\\s*=\\s*",2); 277 277 keyValue[i][0] = pair[0]; 278 278 keyValue[i][1] = pair.length<2 ? "": pair[1]; -
trunk/src/org/openstreetmap/josm/io/remotecontrol/DNSName.java
r8404 r8444 209 209 else if (thisName.endsWith(inName)) { 210 210 int inNdx = thisName.lastIndexOf(inName); 211 if (thisName.charAt(inNdx-1) == '.' 211 if (thisName.charAt(inNdx-1) == '.') 212 212 constraintType = NAME_WIDENS; 213 213 else … … 215 215 } else if (inName.endsWith(thisName)) { 216 216 int ndx = inName.lastIndexOf(thisName); 217 if (inName.charAt(ndx-1) == '.' 217 if (inName.charAt(ndx-1) == '.') 218 218 constraintType = NAME_NARROWS; 219 219 else -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java
r8394 r8444 53 53 @Override 54 54 public String[] getOptionalParams() { 55 return new String[] { "addtags"};55 return new String[] {"addtags"}; 56 56 } 57 57 -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java
r8193 r8444 39 39 @Override 40 40 public String[] getOptionalParams() { 41 return new String[] { 41 return new String[] {"title", "type", "cookies", "min_zoom", "max_zoom"}; 42 42 } 43 43 … … 139 139 } 140 140 })); 141 return new String[] { 141 return new String[] {"/imagery?title=osm&type=tms&url=https://a.tile.openstreetmap.org/%7Bzoom%7D/%7Bx%7D/%7By%7D.png", 142 142 "/imagery?title=landsat&type=wms&url=http://irs.gis-lab.info/?layers=landsat&SRS=%7Bproj%7D&WIDTH=%7Bwidth%7D&HEIGHT=%7Bheight%7D&BBOX=%7Bbbox%7D", 143 143 "/imagery?title=...&type={"+types+"}&url=....[&cookies=...][&min_zoom=...][&max_zoom=...]"}; -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java
r8400 r8444 71 71 @Override 72 72 public String[] getUsageExamples() { 73 return new String[] { "/import?url="+Main.getJOSMWebsite()+"/browser/josm/trunk/data_nodist/direction-arrows.osm"};73 return new String[] {"/import?url="+Main.getJOSMWebsite()+"/browser/josm/trunk/data_nodist/direction-arrows.osm"}; 74 74 } 75 75 -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java
r8394 r8444 68 68 @Override 69 69 public String[] getMandatoryParams() { 70 return new String[] { "bottom", "top", "left", "right"};70 return new String[] {"bottom", "top", "left", "right"}; 71 71 } 72 72 -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/VersionHandler.java
r7937 r8444 59 59 @Override 60 60 public String[] getUsageExamples() { 61 return new String[] { 61 return new String[] {"/version", "/version?jsonp=test"}; 62 62 } 63 63 } -
trunk/src/org/openstreetmap/josm/io/session/SessionReader.java
r8404 r8444 531 531 Main.parent, 532 532 title, 533 new String[] { tr("Cancel"), tr("Skip layer and continue")}533 new String[] {tr("Cancel"), tr("Skip layer and continue")} 534 534 ); 535 535 dlg.setButtonIcons(new String[] {"cancel", "dialogs/next"});
Note:
See TracChangeset
for help on using the changeset viewer.