Changeset 8379 in josm
- Timestamp:
- 2015-05-17T05:48:46+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 35 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
r8308 r8379 157 157 protected void alertFilesNotMatchingWithImporter(Collection<File> files, FileImporter importer) { 158 158 final StringBuilder msg = new StringBuilder(); 159 msg.append("<html>"); 160 msg.append( 159 msg.append("<html>").append( 161 160 trn( 162 161 "Cannot open {0} file with the file importer ''{1}''.", … … 166 165 importer.filter.getDescription() 167 166 ) 168 ).append("<br>"); 169 msg.append("<ul>"); 167 ).append("<br>").append("<ul>"); 170 168 for (File f: files) { 171 169 msg.append("<li>").append(f.getAbsolutePath()).append("</li>"); … … 184 182 protected void alertFilesWithUnknownImporter(Collection<File> files) { 185 183 final StringBuilder msg = new StringBuilder(); 186 msg.append("<html>"); 187 msg.append( 184 msg.append("<html>").append( 188 185 trn( 189 186 "Cannot open {0} file because file does not exist or no suitable file importer is available.", … … 192 189 files.size() 193 190 ) 194 ).append("<br>"); 195 msg.append("<ul>"); 191 ).append("<br>").append("<ul>"); 196 192 for (File f: files) { 197 msg.append("<li>"); 198 msg.append(f.getAbsolutePath()); 199 msg.append(" (<i>"); 200 msg.append(f.exists() ? tr("no importer") : tr("does not exist")); 201 msg.append("</i>)</li>"); 193 msg.append("<li>").append(f.getAbsolutePath()).append(" (<i>") 194 .append(f.exists() ? tr("no importer") : tr("does not exist")) 195 .append("</i>)</li>"); 202 196 } 203 197 msg.append("</ul>"); -
trunk/src/org/openstreetmap/josm/actions/SearchNotesDownloadAction.java
r8304 r8379 73 73 74 74 performSearch(searchTerm); 75 76 75 } 77 76 … … 91 90 92 91 StringBuilder sb = new StringBuilder(); 93 sb.append(OsmApi.getOsmApi().getBaseUrl()) ;94 sb.append("notes/search?limit=");95 sb.append(noteLimit);96 sb.append("&closed=");97 sb.append(closedLimit);98 sb.append("&q=");99 sb.append(Utils.encodeUrl(searchTerm));92 sb.append(OsmApi.getOsmApi().getBaseUrl()) 93 .append("notes/search?limit=") 94 .append(noteLimit) 95 .append("&closed=") 96 .append(closedLimit) 97 .append("&q=") 98 .append(Utils.encodeUrl(searchTerm)); 100 99 101 100 new DownloadNotesTask().loadUrl(false, sb.toString(), null); -
trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
r8376 r8379 69 69 public static String getReportHeader() { 70 70 StringBuilder text = new StringBuilder(); 71 text.append(Version.getInstance().getReleaseAttributes()); 72 text.append("\n"); 73 text.append("Identification: " + Version.getInstance().getAgentString()); 74 text.append("\n"); 75 text.append("Memory Usage: "); 76 text.append(Runtime.getRuntime().totalMemory()/1024/1024); 77 text.append(" MB / "); 78 text.append(Runtime.getRuntime().maxMemory()/1024/1024); 79 text.append(" MB ("); 80 text.append(Runtime.getRuntime().freeMemory()/1024/1024); 81 text.append(" MB allocated, but free)"); 82 text.append("\n"); 83 text.append("Java version: " + System.getProperty("java.version") + ", " + System.getProperty("java.vendor") + ", " + System.getProperty("java.vm.name")); 84 text.append("\n"); 71 text.append(Version.getInstance().getReleaseAttributes()) 72 .append("\n") 73 .append("Identification: ").append(Version.getInstance().getAgentString()) 74 .append("\n") 75 .append("Memory Usage: ") 76 .append(Runtime.getRuntime().totalMemory()/1024/1024) 77 .append(" MB / ") 78 .append(Runtime.getRuntime().maxMemory()/1024/1024) 79 .append(" MB (") 80 .append(Runtime.getRuntime().freeMemory()/1024/1024) 81 .append(" MB allocated, but free)") 82 .append("\n") 83 .append("Java version: ").append(System.getProperty("java.version")).append(", ") 84 .append(System.getProperty("java.vendor")).append(", ").append(System.getProperty("java.vm.name")) 85 .append("\n"); 85 86 if (Main.platform.getClass() == PlatformHookUnixoid.class) { 86 87 // Add Java package details 87 88 String packageDetails = ((PlatformHookUnixoid) Main.platform).getJavaPackageDetails(); 88 89 if (packageDetails != null) { 89 text.append("Java package: ") ;90 text.append(packageDetails);91 text.append("\n");90 text.append("Java package: ") 91 .append(packageDetails) 92 .append("\n"); 92 93 } 93 94 // Add WebStart package details if run from JNLP … … 95 96 String webStartDetails = ((PlatformHookUnixoid) Main.platform).getWebStartPackageDetails(); 96 97 if (webStartDetails != null) { 97 text.append("WebStart package: ") ;98 text.append(webStartDetails);99 text.append("\n");98 text.append("WebStart package: ") 99 .append(webStartDetails) 100 .append("\n"); 100 101 } 101 102 } … … 148 149 } 149 150 } 150 text.append("\n") ;151 text.append(PluginHandler.getBugReportText());152 text.append("\n");151 text.append("\n") 152 .append(PluginHandler.getBugReportText()) 153 .append("\n"); 153 154 154 155 Collection<String> errorsWarnings = Main.getLastErrorAndWarnings(); -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/AbstractDownloadTask.java
r8195 r8379 4 4 import java.util.ArrayList; 5 5 import java.util.List; 6 6 7 import org.openstreetmap.josm.io.XmlWriter; 7 8 … … 50 51 @Override 51 52 public String acceptsDocumentationSummary() { 52 StringBuilder buf = new StringBuilder("<tr><td>"); 53 buf.append(getTitle()) ;54 buf.append(":</td><td>");53 StringBuilder buff = new StringBuilder("<tr><td>"); 54 buff.append(getTitle()) 55 .append(":</td><td>"); 55 56 String[] patterns = getPatterns(); 56 57 if (patterns.length>0) { 57 buf.append("<ul>"); 58 buff.append("<ul>"); 58 59 for (String pattern: patterns) { 59 buf.append("<li>") ;60 buf.append(XmlWriter.encode(pattern));61 buf.append("</li>");60 buff.append("<li>") 61 .append(XmlWriter.encode(pattern)) 62 .append("</li>"); 62 63 } 63 buf.append("</ul>"); 64 buff.append("</ul>"); 64 65 } 65 buf.append("</td></tr>"); 66 return buf.toString(); 66 buff.append("</td></tr>"); 67 return buff.toString(); 67 68 } 68 69 … … 80 81 /** 81 82 * Check / decide if the task is safe for remotecontrol. 82 * 83 * 83 84 * Keep in mind that a potential attacker has full control over the content 84 85 * of the file that will be downloaded. 85 86 * If it is possible to run arbitrary code or write to the local file 86 87 * system, then the task is (obviously) not save for remote execution. 87 * 88 * 88 89 * The default value is false = unsafe. Override in a subclass to 89 90 * allow running the task via remotecontol. 90 * 91 * 91 92 * @return true if it is safe to download and open any file of the 92 93 * corresponding format, false otherwise -
trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
r8377 r8379 678 678 result.append('A'); 679 679 } 680 result.append(' ') ;681 result.append(text);680 result.append(' ') 681 .append(text); 682 682 return result.toString(); 683 683 } -
trunk/src/org/openstreetmap/josm/actions/upload/CyclicUploadDependencyException.java
r7005 r8379 32 32 public String getMessage() { 33 33 StringBuilder sb = new StringBuilder(); 34 sb.append(tr("Cyclic dependency between relations:")) ;35 sb.append("[");34 sb.append(tr("Cyclic dependency between relations:")) 35 .append("["); 36 36 for (int i=0; i< cycle.size(); i++) { 37 37 if (i >0 ) { -
trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java
r8374 r8379 78 78 79 79 StringBuilder result = new StringBuilder(); 80 result.append(text.substring(0, m.start(2))) ;81 result.append(leftRight.equals(a) ? b : a);82 result.append(text.substring(m.end(2)));80 result.append(text.substring(0, m.start(2))) 81 .append(leftRight.equals(a) ? b : a) 82 .append(text.substring(m.end(2))); 83 83 84 84 return result.toString(); -
trunk/src/org/openstreetmap/josm/data/osm/Relation.java
r8365 r8379 267 267 } 268 268 269 @Override public String toString() { 269 @Override 270 public String toString() { 270 271 StringBuilder result = new StringBuilder(); 271 result.append("{Relation id=") ;272 result.append(getUniqueId());273 result.append(" version=");274 result.append(getVersion());275 result.append(" ");276 result.append(getFlagsAsString());277 result.append(" [");272 result.append("{Relation id=") 273 .append(getUniqueId()) 274 .append(" version=") 275 .append(getVersion()) 276 .append(" ") 277 .append(getFlagsAsString()) 278 .append(" ["); 278 279 for (RelationMember rm:getMembers()) { 279 result.append(OsmPrimitiveType.from(rm.getMember())) ;280 result.append(" ");281 result.append(rm.getMember().getUniqueId());282 result.append(", ");283 } 284 result.delete(result.length()-2, result.length()) ;285 result.append("]");286 result.append("}");280 result.append(OsmPrimitiveType.from(rm.getMember())) 281 .append(" ") 282 .append(rm.getMember().getUniqueId()) 283 .append(", "); 284 } 285 result.delete(result.length()-2, result.length()) 286 .append("]") 287 .append("}"); 287 288 return result.toString(); 288 289 } -
trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java
r8345 r8379 285 285 @Override 286 286 public String toString() { 287 StringBuilder buf = new StringBuilder("Headers : "); 288 buf.append(overviewHeaderCount) ;289 buf.append("\nSub Hdrs : ");290 buf.append(subGridHeaderCount);291 buf.append("\nSub Grids: ");292 buf.append(subGridCount);293 buf.append("\nType : ");294 buf.append(shiftType);295 buf.append("\nVersion : ");296 buf.append(version);297 buf.append("\nFr Ellpsd: ");298 buf.append(fromEllipsoid);299 buf.append("\nTo Ellpsd: ");300 buf.append(toEllipsoid);301 buf.append("\nFr Maj Ax: ");302 buf.append(fromSemiMajorAxis);303 buf.append("\nFr Min Ax: ");304 buf.append(fromSemiMinorAxis);305 buf.append("\nTo Maj Ax: ");306 buf.append(toSemiMajorAxis);307 buf.append("\nTo Min Ax: ");308 buf.append(toSemiMinorAxis);309 return buf.toString(); 287 StringBuilder buff = new StringBuilder("Headers : "); 288 buff.append(overviewHeaderCount) 289 .append("\nSub Hdrs : ") 290 .append(subGridHeaderCount) 291 .append("\nSub Grids: ") 292 .append(subGridCount) 293 .append("\nType : ") 294 .append(shiftType) 295 .append("\nVersion : ") 296 .append(version) 297 .append("\nFr Ellpsd: ") 298 .append(fromEllipsoid) 299 .append("\nTo Ellpsd: ") 300 .append(toEllipsoid) 301 .append("\nFr Maj Ax: ") 302 .append(fromSemiMajorAxis) 303 .append("\nFr Min Ax: ") 304 .append(fromSemiMinorAxis) 305 .append("\nTo Maj Ax: ") 306 .append(toSemiMajorAxis) 307 .append("\nTo Min Ax: ") 308 .append(toSemiMinorAxis); 309 return buff.toString(); 310 310 } 311 311 -
trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2SubGrid.java
r8332 r8379 301 301 */ 302 302 public String getDetails() { 303 StringBuilder buf = new StringBuilder("Sub Grid : "); 304 buf.append(subGridName) ;305 buf.append("\nParent : ");306 buf.append(parentSubGridName);307 buf.append("\nCreated : ");308 buf.append(created);309 buf.append("\nUpdated : ");310 buf.append(updated);311 buf.append("\nMin Lat : ");312 buf.append(minLat);313 buf.append("\nMax Lat : ");314 buf.append(maxLat);315 buf.append("\nMin Lon : ");316 buf.append(minLon);317 buf.append("\nMax Lon : ");318 buf.append(maxLon);319 buf.append("\nLat Intvl: ");320 buf.append(latInterval);321 buf.append("\nLon Intvl: ");322 buf.append(lonInterval);323 buf.append("\nNode Cnt : ");324 buf.append(nodeCount);325 return buf.toString(); 303 StringBuilder buff = new StringBuilder("Sub Grid : "); 304 buff.append(subGridName) 305 .append("\nParent : ") 306 .append(parentSubGridName) 307 .append("\nCreated : ") 308 .append(created) 309 .append("\nUpdated : ") 310 .append(updated) 311 .append("\nMin Lat : ") 312 .append(minLat) 313 .append("\nMax Lat : ") 314 .append(maxLat) 315 .append("\nMin Lon : ") 316 .append(minLon) 317 .append("\nMax Lon : ") 318 .append(maxLon) 319 .append("\nLat Intvl: ") 320 .append(latInterval) 321 .append("\nLon Intvl: ") 322 .append(lonInterval) 323 .append("\nNode Cnt : ") 324 .append(nodeCount); 325 return buff.toString(); 326 326 } 327 327 -
trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
r8342 r8379 512 512 private String buildDefaultToolTip(long id, Map<String, String> tags) { 513 513 StringBuilder sb = new StringBuilder(); 514 sb.append("<html>") ;515 sb.append("<strong>id</strong>=")514 sb.append("<html>") 515 .append("<strong>id</strong>=") 516 516 .append(id) 517 517 .append("<br>"); -
trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java
r8308 r8379 631 631 /** 632 632 * Represents a rectangular area of tiles at a given zoom level. 633 *634 633 */ 635 634 private static class TileBounds { 636 p ublicPoint min;637 p ublicPoint max;638 p ublicint zoomLevel;639 640 p ublicTileBounds() {635 private Point min; 636 private Point max; 637 private int zoomLevel; 638 639 private TileBounds() { 641 640 zoomLevel = 0; 642 641 min = new Point(0,0); … … 644 643 } 645 644 646 p ublicTileBounds(Point min, Point max, int zoomLevel) {645 private TileBounds(Point min, Point max, int zoomLevel) { 647 646 this.min = min; 648 647 this.max = max; … … 653 652 public String toString() { 654 653 StringBuilder sb = new StringBuilder(); 655 sb.append("min=").append(min.x).append(",").append(min.y).append(",") ;656 sb.append("max=").append(max.x).append(",").append(max.y).append(",");657 sb.append("zoom=").append(zoomLevel);654 sb.append("min=").append(min.x).append(",").append(min.y).append(",") 655 .append("max=").append(max.x).append(",").append(max.y).append(",") 656 .append("zoom=").append(zoomLevel); 658 657 return sb.toString(); 659 658 } … … 667 666 private Point max; 668 667 669 p ublicTileBoundsMapView() {668 private TileBoundsMapView() { 670 669 setBorder(BorderFactory.createLineBorder(Color.DARK_GRAY)); 671 670 TileLoader loader = tileController.getTileLoader(); -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java
r8375 r8379 357 357 } 358 358 StringBuilder sb = new StringBuilder(); 359 sb.append("<html>") ;360 sb.append(tr("The following objects could not be copied to the target object<br>because they are deleted in the target dataset:"));361 sb.append(Utils.joinAsHtmlUnorderedList(items));362 sb.append("</html>");359 sb.append("<html>") 360 .append(tr("The following objects could not be copied to the target object<br>because they are deleted in the target dataset:")) 361 .append(Utils.joinAsHtmlUnorderedList(items)) 362 .append("</html>"); 363 363 HelpAwareOptionPane.showOptionDialog( 364 364 Main.parent, -
trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
r8377 r8379 606 606 text.append(tableRow(tr("Background:"), Utils.toString(s.getBackgroundColorOverride()))); 607 607 } 608 text.append(tableRow(tr("Style is currently active?"), s.active ? tr("Yes") : tr("No"))) ;609 text.append("</table>");608 text.append(tableRow(tr("Style is currently active?"), s.active ? tr("Yes") : tr("No"))) 609 .append("</table>"); 610 610 p.add(new JScrollPane(new HtmlPanel(text.toString())), GBC.eol().fill(GBC.BOTH)); 611 611 return p; -
trunk/src/org/openstreetmap/josm/gui/io/ChangesetCellRenderer.java
r7299 r8379 35 35 protected String buildToolTipText(Changeset cs) { 36 36 StringBuilder sb = new StringBuilder(); 37 sb.append("<html>") ;38 sb.append("<strong>").append(tr("Changeset id:")).append("</strong>").append(cs.getId()).append("<br>");37 sb.append("<html>") 38 .append("<strong>").append(tr("Changeset id:")).append("</strong>").append(cs.getId()).append("<br>"); 39 39 if (cs.getCreatedAt() != null) { 40 40 sb.append("<strong>").append(tr("Created at:")).append("</strong>").append( -
trunk/src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java
r8308 r8379 79 79 SaveLayerInfo info = (SaveLayerInfo)value; 80 80 StringBuilder sb = new StringBuilder(); 81 sb.append("<html>") ;82 sb.append(addLblLayerName(info));83 sb.append("<br>");81 sb.append("<html>") 82 .append(addLblLayerName(info)) 83 .append("<br>"); 84 84 add(btnFileChooser, GBC.std()); 85 sb.append(addLblFilename(info)); 86 87 sb.append("</html>"); 85 sb.append(addLblFilename(info)) 86 .append("</html>"); 88 87 setToolTipText(sb.toString()); 89 88 return this; … … 98 97 99 98 StringBuilder sb = new StringBuilder(); 100 sb.append("<html>") ;101 sb.append(addLblLayerName(info));102 sb.append("<br/>");99 sb.append("<html>") 100 .append(addLblLayerName(info)) 101 .append("<br/>"); 103 102 104 103 add(btnFileChooser, GBC.std()); … … 106 105 tfFilename.selectAll(); 107 106 108 sb.append(tfFilename.getToolTipText()) ;109 sb.append("</html>");107 sb.append(tfFilename.getToolTipText()) 108 .append("</html>"); 110 109 setToolTipText(sb.toString()); 111 110 return this; -
trunk/src/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java
r8308 r8379 142 142 protected void updateSummary() { 143 143 StringBuilder sb = new StringBuilder(); 144 sb.append("<html>") ;145 sb.append(buildStrategySummary());146 sb.append("<br><br>");147 sb.append(buildChangesetSummary());148 sb.append("</html>");144 sb.append("<html>") 145 .append(buildStrategySummary()) 146 .append("<br><br>") 147 .append(buildChangesetSummary()) 148 .append("</html>"); 149 149 jepMessage.setText(sb.toString()); 150 150 } -
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r8378 r8379 157 157 info.append("</td></tr>"); 158 158 } 159 160 159 info.append("</table><br><br>"); 161 162 } 163 164 info.append(tr("Length: {0}", NavigatableComponent.getSystemOfMeasurement().getDistText(data.length()))).append("<br>"); 165 166 info.append(trn("{0} route, ", "{0} routes, ", data.routes.size(), data.routes.size())).append( 160 } 161 162 info.append(tr("Length: {0}", NavigatableComponent.getSystemOfMeasurement().getDistText(data.length()))).append("<br>") 163 .append(trn("{0} route, ", "{0} routes, ", data.routes.size(), data.routes.size())).append( 167 164 trn("{0} waypoint", "{0} waypoints", data.waypoints.size(), data.waypoints.size())).append("<br>"); 168 165 … … 222 219 } 223 220 224 info.append(trn("{0} track, ", "{0} tracks, ", data.tracks.size(), data.tracks.size())); 225 info.append(trn("{0} route, ", "{0} routes, ", data.routes.size(), data.routes.size())); 226 info.append(trn("{0} waypoint", "{0} waypoints", data.waypoints.size(), data.waypoints.size())).append("<br>"); 227 228 info.append(tr("Length: {0}", NavigatableComponent.getSystemOfMeasurement().getDistText(data.length()))); 229 info.append("<br>"); 230 231 return info.append("</html>").toString(); 221 info.append(trn("{0} track, ", "{0} tracks, ", data.tracks.size(), data.tracks.size())) 222 .append(trn("{0} route, ", "{0} routes, ", data.routes.size(), data.routes.size())) 223 .append(trn("{0} waypoint", "{0} waypoints", data.waypoints.size(), data.waypoints.size())).append("<br>") 224 .append(tr("Length: {0}", NavigatableComponent.getSystemOfMeasurement().getDistText(data.length()))) 225 .append("<br>") 226 .append("</html>"); 227 return info.toString(); 232 228 } 233 229 -
trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java
r8345 r8379 112 112 if (noteData.getSelectedNote() != null) { 113 113 StringBuilder sb = new StringBuilder("<html>"); 114 sb.append(tr("Note")) ;115 sb.append(" ").append(noteData.getSelectedNote().getId());114 sb.append(tr("Note")) 115 .append(" ").append(noteData.getSelectedNote().getId()); 116 116 for (NoteComment comment : noteData.getSelectedNote().getComments()) { 117 117 String commentText = comment.getText(); … … 195 195 public Object getInfoComponent() { 196 196 StringBuilder sb = new StringBuilder(); 197 sb.append(tr("Notes layer")) ;198 sb.append("\n");199 sb.append(tr("Total notes:"));200 sb.append(" ");201 sb.append(noteData.getNotes().size());202 sb.append("\n");203 sb.append(tr("Changes need uploading?"));204 sb.append(" ");205 sb.append(isModified());197 sb.append(tr("Notes layer")) 198 .append("\n") 199 .append(tr("Total notes:")) 200 .append(" ") 201 .append(noteData.getNotes().size()) 202 .append("\n") 203 .append(tr("Changes need uploading?")) 204 .append(" ") 205 .append(isModified()); 206 206 return sb.toString(); 207 207 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/TextElement.java
r8291 r8379 178 178 protected String toStringImpl() { 179 179 StringBuilder sb = new StringBuilder(); 180 sb.append("labelCompositionStrategy=" + labelCompositionStrategy) ;181 sb.append(" font=" + font);180 sb.append("labelCompositionStrategy=" + labelCompositionStrategy) 181 .append(" font=" + font); 182 182 if (xOffset != 0) { 183 183 sb.append(" xOffset=" + xOffset); … … 188 188 sb.append(" color=" + Utils.toString(color)); 189 189 if (haloRadius != null) { 190 sb.append(" haloRadius=" + haloRadius) ;191 sb.append(" haloColor=" + haloColor);190 sb.append(" haloRadius=" + haloRadius) 191 .append(" haloColor=" + haloColor); 192 192 } 193 193 return sb.toString(); -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanel.java
r8308 r8379 71 71 a.append("[").append(z).append("]"); 72 72 } 73 a.append(":"); 74 a.append(getImageryRawUrl()); 73 a.append(":").append(getImageryRawUrl()); 75 74 return a.toString(); 76 75 } -
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java
r8342 r8379 178 178 private static void alertPluginStillRequired(Component parent, String plugin, Set<String> otherPlugins) { 179 179 StringBuilder sb = new StringBuilder(); 180 sb.append("<html>") ;181 sb.append(trn("Plugin {0} is still required by this plugin:",180 sb.append("<html>") 181 .append(trn("Plugin {0} is still required by this plugin:", 182 182 "Plugin {0} is still required by these {1} plugins:", 183 183 otherPlugins.size(), 184 184 plugin, 185 otherPlugins.size() 186 )); 187 sb.append(Utils.joinAsHtmlUnorderedList(otherPlugins)); 188 sb.append("</html>"); 185 otherPlugins.size())) 186 .append(Utils.joinAsHtmlUnorderedList(otherPlugins)) 187 .append("</html>"); 189 188 JOptionPane.showMessageDialog( 190 189 parent, -
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java
r8378 r8379 127 127 final Collection<PluginInformation> failed = task.getFailedPlugins(); 128 128 final StringBuilder sb = new StringBuilder(); 129 sb.append("<html>") ;130 sb.append(buildDownloadSummary(task));129 sb.append("<html>") 130 .append(buildDownloadSummary(task)); 131 131 if (restartRequired) { 132 132 sb.append(tr("Please restart JOSM to activate the downloaded plugins.")); -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java
r8056 r8379 169 169 private JComponent build() { 170 170 StringBuilder s = new StringBuilder(); 171 s.append("<b>+proj=...</b> - <i>"+tr("Projection name")+"</i><br>") ;172 s.append(" "+tr("Supported values:")+" ");173 s.append(listKeys(Projections.projs)+"<br>");174 s.append("<b>+lat_0=..., +lat_1=..., +lat_2=...</b> - <i>"+tr("Projection parameters")+"</i><br>");175 s.append("<b>+x_0=..., +y_0=...</b> - <i>"+tr("False easting and false northing")+"</i><br>");176 s.append("<b>+lon_0=...</b> - <i>"+tr("Central meridian")+"</i><br>");177 s.append("<b>+k_0=...</b> - <i>"+tr("Scaling factor")+"</i><br>");178 s.append("<b>+ellps=...</b> - <i>"+tr("Ellipsoid name")+"</i><br>");179 s.append(" "+tr("Supported values:")+" ");180 s.append(listKeys(Projections.ellipsoids)+"<br>");181 s.append("<b>+a=..., +b=..., +rf=..., +f=..., +es=...</b> - <i>"+tr("Ellipsoid parameters")+"</i><br>");182 s.append("<b>+datum=...</b> - <i>"+tr("Datum name")+"</i><br>");183 s.append(" "+tr("Supported values:")+" ");184 s.append(listKeys(Projections.datums)+"<br>");185 s.append("<b>+towgs84=...</b> - <i>"+tr("3 or 7 term datum transform parameters")+"</i><br>");186 s.append("<b>+nadgrids=...</b> - <i>"+tr("NTv2 grid file")+"</i><br>");187 s.append(" "+tr("Built-in:")+" ");188 s.append(listKeys(Projections.nadgrids)+"<br>");189 s.append("<b>+bounds=</b>minlon,minlat,maxlon,maxlat - <i>"+tr("Projection bounds (in degrees)")+"</i><br>");190 s.append("<b>+wmssrs=</b>EPSG:123456 - <i>"+tr("Sets the SRS=... parameter in the WMS request")+"</i><br>");171 s.append("<b>+proj=...</b> - <i>"+tr("Projection name")+"</i><br>") 172 .append(" "+tr("Supported values:")+" ") 173 .append(listKeys(Projections.projs)+"<br>") 174 .append("<b>+lat_0=..., +lat_1=..., +lat_2=...</b> - <i>"+tr("Projection parameters")+"</i><br>") 175 .append("<b>+x_0=..., +y_0=...</b> - <i>"+tr("False easting and false northing")+"</i><br>") 176 .append("<b>+lon_0=...</b> - <i>"+tr("Central meridian")+"</i><br>") 177 .append("<b>+k_0=...</b> - <i>"+tr("Scaling factor")+"</i><br>") 178 .append("<b>+ellps=...</b> - <i>"+tr("Ellipsoid name")+"</i><br>") 179 .append(" "+tr("Supported values:")+" ") 180 .append(listKeys(Projections.ellipsoids)+"<br>") 181 .append("<b>+a=..., +b=..., +rf=..., +f=..., +es=...</b> - <i>"+tr("Ellipsoid parameters")+"</i><br>") 182 .append("<b>+datum=...</b> - <i>"+tr("Datum name")+"</i><br>") 183 .append(" "+tr("Supported values:")+" ") 184 .append(listKeys(Projections.datums)+"<br>") 185 .append("<b>+towgs84=...</b> - <i>"+tr("3 or 7 term datum transform parameters")+"</i><br>") 186 .append("<b>+nadgrids=...</b> - <i>"+tr("NTv2 grid file")+"</i><br>") 187 .append(" "+tr("Built-in:")+" ") 188 .append(listKeys(Projections.nadgrids)+"<br>") 189 .append("<b>+bounds=</b>minlon,minlat,maxlon,maxlat - <i>"+tr("Projection bounds (in degrees)")+"</i><br>") 190 .append("<b>+wmssrs=</b>EPSG:123456 - <i>"+tr("Sets the SRS=... parameter in the WMS request")+"</i><br>"); 191 191 192 192 return new HtmlPanel(s.toString()); -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
r8377 r8379 121 121 122 122 final StringBuilder res = new StringBuilder("<b>"); 123 res.append(getDisplayValue(true).replaceAll("<", "<").replaceAll(">", ">")) ;124 res.append("</b>");123 res.append(getDisplayValue(true).replaceAll("<", "<").replaceAll(">", ">")) 124 .append("</b>"); 125 125 if (getShortDescription(true) != null) { 126 126 // wrap in table to restrict the text width 127 res.append("<div style=\"width:300px; padding:0 0 5px 5px\">") ;128 res.append(getShortDescription(true));129 res.append("</div>");127 res.append("<div style=\"width:300px; padding:0 0 5px 5px\">") 128 .append(getShortDescription(true)) 129 .append("</div>"); 130 130 } 131 131 return res.toString(); -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionListItem.java
r8376 r8379 88 88 public String toString() { 89 89 StringBuilder sb = new StringBuilder(); 90 sb.append("<val='") ;91 sb.append(value);92 sb.append("',");93 sb.append(priority);94 sb.append(">");90 sb.append("<val='") 91 .append(value) 92 .append("',") 93 .append(priority) 94 .append(">"); 95 95 return sb.toString(); 96 96 } -
trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java
r8376 r8379 1021 1021 int nChildren = getChildren().size(); 1022 1022 StringBuffer sb = new StringBuffer("MultiSplitLayout.Split"); 1023 sb.append(isRowLayout() ? " ROW [" : " COLUMN [") ;1024 sb.append(nChildren + ((nChildren == 1) ? " child" : " children"));1025 sb.append("] ");1026 sb.append(getBounds());1023 sb.append(isRowLayout() ? " ROW [" : " COLUMN [") 1024 .append(nChildren + ((nChildren == 1) ? " child" : " children")) 1025 .append("] ") 1026 .append(getBounds()); 1027 1027 return sb.toString(); 1028 1028 } … … 1074 1074 public String toString() { 1075 1075 StringBuffer sb = new StringBuffer("MultiSplitLayout.Leaf"); 1076 sb.append(" \"") ;1077 sb.append(getName());1078 sb.append('\"');1079 sb.append(" weight=");1080 sb.append(getWeight());1081 sb.append(' ');1082 sb.append(getBounds());1076 sb.append(" \"") 1077 .append(getName()) 1078 .append('\"') 1079 .append(" weight=") 1080 .append(getWeight()) 1081 .append(' ') 1082 .append(getBounds()); 1083 1083 return sb.toString(); 1084 1084 } -
trunk/src/org/openstreetmap/josm/io/NMEAImporter.java
r7326 r8379 70 70 private void showNmeaInfobox(boolean success, NmeaReader r) { 71 71 final StringBuilder msg = new StringBuilder().append("<html>"); 72 msg.append(tr("Coordinates imported: {0}", r.getNumberOfCoordinates()) + "<br>") ;73 msg.append(tr("Malformed sentences: {0}", r.getParserMalformed()) + "<br>");74 msg.append(tr("Checksum errors: {0}", r.getParserChecksumErrors()) + "<br>");72 msg.append(tr("Coordinates imported: {0}", r.getNumberOfCoordinates()) + "<br>") 73 .append(tr("Malformed sentences: {0}", r.getParserMalformed()) + "<br>") 74 .append(tr("Checksum errors: {0}", r.getParserChecksumErrors()) + "<br>"); 75 75 if (!success) { 76 76 msg.append(tr("Unknown sentences: {0}", r.getParserUnknown()) + "<br>"); 77 77 } 78 msg.append(tr("Zero coordinates: {0}", r.getParserZeroCoordinates())) ;79 msg.append("</html>");78 msg.append(tr("Zero coordinates: {0}", r.getParserZeroCoordinates())) 79 .append("</html>"); 80 80 if (success) { 81 81 SwingUtilities.invokeLater(new Runnable() { -
trunk/src/org/openstreetmap/josm/io/OsmServerObjectReader.java
r8378 r8379 117 117 progressMonitor.indeterminateSubTask(tr("Downloading OSM data...")); 118 118 StringBuilder sb = new StringBuilder(); 119 sb.append(id.getType().getAPIName()) ;120 sb.append("/");121 sb.append(id.getUniqueId());119 sb.append(id.getType().getAPIName()) 120 .append("/") 121 .append(id.getUniqueId()); 122 122 if (full && ! id.getType().equals(OsmPrimitiveType.NODE)) { 123 123 sb.append("/full"); -
trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
r8376 r8379 81 81 } 82 82 StringBuilder a = new StringBuilder(serviceUrl.getProtocol()); 83 a.append("://") ;84 a.append(serviceUrl.getHost());83 a.append("://") 84 .append(serviceUrl.getHost()); 85 85 if (serviceUrl.getPort() != -1) { 86 a.append(":") ;87 a.append(serviceUrl.getPort());88 } 89 a.append(serviceUrl.getPath()) ;90 a.append("?");86 a.append(":") 87 .append(serviceUrl.getPort()); 88 } 89 a.append(serviceUrl.getPath()) 90 .append("?"); 91 91 if (serviceUrl.getQuery() != null) { 92 92 a.append(serviceUrl.getQuery()); -
trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java
r8332 r8379 96 96 private String getToolTip() { 97 97 StringBuilder sb = new StringBuilder(); 98 sb.append("<html>") ;99 sb.append(tr("Old values of"));100 sb.append(" <b>");101 sb.append(tag);102 sb.append("</b><br/>");98 sb.append("<html>") 99 .append(tr("Old values of")) 100 .append(" <b>") 101 .append(tag) 102 .append("</b><br/>"); 103 103 for (Entry<String, Integer> e : valueCount.entrySet()) { 104 sb.append("<b>") ;105 sb.append(e.getValue());106 sb.append(" x </b>");107 sb.append(e.getKey());108 sb.append("<br/>");104 sb.append("<b>") 105 .append(e.getValue()) 106 .append(" x </b>") 107 .append(e.getKey()) 108 .append("<br/>"); 109 109 } 110 110 sb.append("</html>"); -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r8345 r8379 269 269 // 270 270 StringBuilder sb = new StringBuilder(); 271 sb.append("<html>") ;272 sb.append(trn(271 sb.append("<html>") 272 .append(trn( 273 273 "The following plugin is no longer necessary and has been deactivated:", 274 274 "The following plugins are no longer necessary and have been deactivated:", 275 removedPlugins.size() 276 )); 277 sb.append("<ul>"); 275 removedPlugins.size())) 276 .append("<ul>"); 278 277 for (DeprecatedPlugin depr: removedPlugins) { 279 278 sb.append("<li>").append(depr.name); … … 283 282 sb.append("</li>"); 284 283 } 285 sb.append("</ul>") ;286 sb.append("</html>");284 sb.append("</ul>") 285 .append("</html>"); 287 286 JOptionPane.showMessageDialog( 288 287 parent, … … 462 461 private static void alertMissingRequiredPlugin(Component parent, String plugin, Set<String> missingRequiredPlugin) { 463 462 StringBuilder sb = new StringBuilder(); 464 sb.append("<html>") ;465 sb.append(trn("Plugin {0} requires a plugin which was not found. The missing plugin is:",463 sb.append("<html>") 464 .append(trn("Plugin {0} requires a plugin which was not found. The missing plugin is:", 466 465 "Plugin {0} requires {1} plugins which were not found. The missing plugins are:", 467 466 missingRequiredPlugin.size(), 468 467 plugin, 469 missingRequiredPlugin.size() 470 )); 471 sb.append(Utils.joinAsHtmlUnorderedList(missingRequiredPlugin)); 472 sb.append("</html>"); 468 missingRequiredPlugin.size())) 469 .append(Utils.joinAsHtmlUnorderedList(missingRequiredPlugin)) 470 .append("</html>"); 473 471 JOptionPane.showMessageDialog( 474 472 parent, … … 757 755 private static void alertMissingPluginInformation(Component parent, Collection<String> plugins) { 758 756 StringBuilder sb = new StringBuilder(); 759 sb.append("<html>") ;760 sb.append(trn("JOSM could not find information about the following plugin:",757 sb.append("<html>") 758 .append(trn("JOSM could not find information about the following plugin:", 761 759 "JOSM could not find information about the following plugins:", 762 plugins.size())) ;763 sb.append(Utils.joinAsHtmlUnorderedList(plugins));764 sb.append(trn("The plugin is not going to be loaded.",760 plugins.size())) 761 .append(Utils.joinAsHtmlUnorderedList(plugins)) 762 .append(trn("The plugin is not going to be loaded.", 765 763 "The plugins are not going to be loaded.", 766 plugins.size())) ;767 sb.append("</html>");764 plugins.size())) 765 .append("</html>"); 768 766 HelpAwareOptionPane.showOptionDialog( 769 767 parent, … … 819 817 private static void alertFailedPluginUpdate(Component parent, Collection<PluginInformation> plugins) { 820 818 StringBuilder sb = new StringBuilder(); 821 sb.append("<html>") ;822 sb.append(trn(819 sb.append("<html>") 820 .append(trn( 823 821 "Updating the following plugin has failed:", 824 822 "Updating the following plugins has failed:", 825 plugins.size() 826 ) 827 ); 828 sb.append("<ul>"); 823 plugins.size())) 824 .append("<ul>"); 829 825 for (PluginInformation pi: plugins) { 830 826 sb.append("<li>").append(pi.name).append("</li>"); 831 827 } 832 sb.append("</ul>") ;833 sb.append(trn(828 sb.append("</ul>") 829 .append(trn( 834 830 "Please open the Preference Dialog after JOSM has started and try to update it manually.", 835 831 "Please open the Preference Dialog after JOSM has started and try to update them manually.", 836 plugins.size() 837 )); 838 sb.append("</html>"); 832 plugins.size())) 833 .append("</html>"); 839 834 HelpAwareOptionPane.showOptionDialog( 840 835 parent, … … 1198 1193 1199 1194 final StringBuilder msg = new StringBuilder(); 1200 msg.append("<html>") ;1201 msg.append(tr("An unexpected exception occurred that may have come from the ''{0}'' plugin.", plugin.getPluginInformation().name));1202 msg.append("<br>");1195 msg.append("<html>") 1196 .append(tr("An unexpected exception occurred that may have come from the ''{0}'' plugin.", plugin.getPluginInformation().name)) 1197 .append("<br>"); 1203 1198 if (plugin.getPluginInformation().author != null) { 1204 msg.append(tr("According to the information within the plugin, the author is {0}.", plugin.getPluginInformation().author)) ;1205 msg.append("<br>");1206 } 1207 msg.append(tr("Try updating to the newest version of this plugin before reporting a bug.")) ;1208 msg.append("</html>");1199 msg.append(tr("According to the information within the plugin, the author is {0}.", plugin.getPluginInformation().author)) 1200 .append("<br>"); 1201 } 1202 msg.append(tr("Try updating to the newest version of this plugin before reporting a bug.")) 1203 .append("</html>"); 1209 1204 1210 1205 try { -
trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
r8342 r8379 305 305 public String getDescriptionAsHtml() { 306 306 StringBuilder sb = new StringBuilder(); 307 sb.append("<html><body>") ;308 sb.append(description == null ? tr("no description available") : description);307 sb.append("<html><body>") 308 .append(description == null ? tr("no description available") : description); 309 309 if (link != null) { 310 310 sb.append(" <a href=\"").append(link).append("\">").append(tr("More info...")).append("</a>"); -
trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
r8338 r8379 114 114 URL url = new URL(site); 115 115 StringBuilder sb = new StringBuilder(); 116 sb.append("site-") ;117 sb.append(url.getHost()).append("-");116 sb.append("site-") 117 .append(url.getHost()).append("-"); 118 118 if (url.getPort() != -1) { 119 119 sb.append(url.getPort()).append("-"); -
trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
r8308 r8379 241 241 StringBuilder message = new StringBuilder("<html>"); 242 242 message.append(tr("A previous version of JOSM has installed a custom certificate "+ 243 "in order to provide HTTPS support for Remote Control:")) ;244 message.append("<br><ul>");243 "in order to provide HTTPS support for Remote Control:")) 244 .append("<br><ul>"); 245 245 for (String alias : insecureCertificates) { 246 message.append("<li>") ;247 message.append(alias);248 message.append("</li>");246 message.append("<li>") 247 .append(alias) 248 .append("</li>"); 249 249 } 250 message.append("</ul>") ;251 message.append(tr("It appears it could be an important <b>security risk</b>.<br><br>"+250 message.append("</ul>") 251 .append(tr("It appears it could be an important <b>security risk</b>.<br><br>"+ 252 252 "You are now going to be prompted by Windows to remove this insecure certificate.<br>"+ 253 "For your own safety, <b>please click Yes</b> in next dialog.")) ;254 message.append("</html>");253 "For your own safety, <b>please click Yes</b> in next dialog.")) 254 .append("</html>"); 255 255 JOptionPane.showMessageDialog(Main.parent, message.toString(), tr("Warning"), JOptionPane.WARNING_MESSAGE); 256 256 for (String alias : insecureCertificates) { … … 283 283 "You are now going to be prompted by Windows to confirm this operation.<br>"+ 284 284 "To enable proper HTTPS support, <b>please click Yes</b> in next dialog.<br><br>"+ 285 "If unsure, you can also click No then disable HTTPS support in Remote Control preferences.")) ;286 message.append("</html>");285 "If unsure, you can also click No then disable HTTPS support in Remote Control preferences.")) 286 .append("</html>"); 287 287 JOptionPane.showMessageDialog(Main.parent, message.toString(), 288 288 tr("HTTPS support in Remote Control"), JOptionPane.INFORMATION_MESSAGE);
Note:
See TracChangeset
for help on using the changeset viewer.