Changeset 8419 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2015-05-23T01:40:23+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/AlphanumComparator.java
r8378 r8419 40 40 * 41 41 */ 42 public class AlphanumComparator implements Comparator<String>, Serializable { 42 public final class AlphanumComparator implements Comparator<String>, Serializable { 43 43 44 44 private static final long serialVersionUID = 1L; -
trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java
r8413 r8419 79 79 throw new InterruptedException(); 80 80 } 81 protected void failed 81 protected void failed(Exception e) { 82 82 exception = e; 83 83 result = Result.FAILED; 84 84 state = State.NOTPLAYING; 85 85 } 86 protected void ok 86 protected void ok(State newState) { 87 87 result = Result.OK; 88 88 state = newState; -
trunk/src/org/openstreetmap/josm/tools/ColorScale.java
r7937 r8419 10 10 * @since 7319 11 11 */ 12 public class ColorScale { 12 public final class ColorScale { 13 13 private double min, max; 14 14 private Color noDataColor; -
trunk/src/org/openstreetmap/josm/tools/Diff.java
r8395 r8419 152 152 It cannot cause incorrect diff output. */ 153 153 154 private int diag 154 private int diag(int xoff, int xlim, int yoff, int ylim) { 155 155 final int[] fd = fdiag; // Give the compiler a chance. 156 156 final int[] bd = bdiag; // Additional help for the compiler. … … 323 323 All line numbers are origin-0 and discarded lines are not counted. */ 324 324 325 private void compareseq 325 private void compareseq(int xoff, int xlim, int yoff, int ylim) { 326 326 /* Slide down the bottom initial diagonal. */ 327 327 while (xoff < xlim && yoff < ylim && xvec[xoff] == yvec[yoff]) { … … 345 345 /* Find a point of correspondence in the middle of the files. */ 346 346 347 int d = diag 347 int d = diag(xoff, xlim, yoff, ylim); 348 348 int c = cost; 349 349 int b = bdiag[bdiagoff + d]; … … 357 357 else { 358 358 /* Use that point to split this problem into two subproblems. */ 359 compareseq 359 compareseq(xoff, b, yoff, b - d); 360 360 /* This used to use f instead of b, 361 361 but that is incorrect! 362 362 It is not necessarily the case that diagonal d 363 363 has a snake from b to f. */ 364 compareseq 364 compareseq(b, xlim, b - d, ylim); 365 365 } 366 366 } … … 494 494 and avoid even thinking about them in the main comparison algorithm. */ 495 495 496 discard_confusing_lines 496 discard_confusing_lines(); 497 497 498 498 /* Now do the main comparison algorithm, considering just the … … 509 509 bdiagoff = filevec[1].nondiscardedLines + 1; 510 510 511 compareseq 511 compareseq(0, filevec[0].nondiscardedLines, 512 512 0, filevec[1].nondiscardedLines); 513 513 fdiag = null; … … 517 517 in cases where that can validly be done. */ 518 518 519 shift_boundaries 519 shift_boundaries(); 520 520 521 521 /* Get the results of comparison in the form of a chain … … 631 631 * Mark to be discarded each line that matches no line of another file. 632 632 * If a line matches many lines, mark it as provisionally discardable. 633 * @param counts The count of each equivalence number for the other file. 634 * @return 0=nondiscardable, 1=discardable or 2=provisionally discardable for each line 633 635 * @see #equivCount() 634 * @param counts The count of each equivalence number for the other file.635 * @return 0=nondiscardable, 1=discardable or 2=provisionally discardable636 * for each line637 636 */ 638 637 private byte[] discardable(final int[] counts) { -
trunk/src/org/openstreetmap/josm/tools/FontsManager.java
r8308 r8419 17 17 * @since 7383 18 18 */ 19 public class FontsManager { 19 public final class FontsManager { 20 20 21 21 /** -
trunk/src/org/openstreetmap/josm/tools/Geometry.java
r8395 r8419 424 424 * @param point Point for which a closest point is searched on line (P1,P2) 425 425 * @return The closest point found on line. It may be outside the segment [P1,P2]. 426 * @see #closestPointToSegment 426 427 * @since 4134 427 * @see #closestPointToSegment428 428 */ 429 429 public static EastNorth closestPointToLine(EastNorth lineP1, EastNorth lineP2, EastNorth point) { … … 690 690 /** 691 691 * Determines whether path from nodes list is oriented clockwise. 692 * @see #isClockwise(Way)693 692 * @param nodes Nodes list to be checked. 694 693 * @return true if and only if way is oriented clockwise. 695 694 * @throws IllegalArgumentException if way is not closed (see {@link Way#isClosed}). 695 * @see #isClockwise(Way) 696 696 */ 697 697 public static boolean isClockwise(List<Node> nodes) { -
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r8412 r8419 466 466 * Limit the maximum width of the image. 467 467 * @param maxWidth maximum image width 468 * @return the current object, for convenience 468 469 * @see #setMaxSize 469 * @return the current object, for convenience470 470 */ 471 471 public ImageProvider setMaxWidth(int maxWidth) { … … 477 477 * Limit the maximum height of the image. 478 478 * @param maxHeight maximum image height 479 * @return the current object, for convenience 479 480 * @see #setMaxSize 480 * @return the current object, for convenience481 481 */ 482 482 public ImageProvider setMaxHeight(int maxHeight) { … … 1102 1102 parser.setEntityResolver(new EntityResolver() { 1103 1103 @Override 1104 public InputSource resolveEntity 1104 public InputSource resolveEntity(String publicId, String systemId) { 1105 1105 return new InputSource(new ByteArrayInputStream(new byte[0])); 1106 1106 } … … 1545 1545 * @return the {@code TransparentColor} defined in image reader metadata, or {@code null} 1546 1546 * @throws IOException if an error occurs during reading 1547 * @see <a href="http://docs.oracle.com/javase/7/docs/api/javax/imageio/metadata/doc-files/standard_metadata.html">javax_imageio_1.0 metadata</a> 1547 1548 * @since 7499 1548 * @see <a href="http://docs.oracle.com/javase/7/docs/api/javax/imageio/metadata/doc-files/standard_metadata.html">javax_imageio_1.0 metadata</a>1549 1549 */ 1550 1550 public static Color getTransparentColor(ColorModel model, ImageReader reader) throws IOException { -
trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java
r8404 r8419 225 225 * 226 226 * @param locale the locale to use, <code>null</code> for default locale 227 * @return list of codes 227 228 * @since 8283 228 * @return list of codes229 229 */ 230 230 public static Collection<String> getLanguageCodes(Locale l) { -
trunk/src/org/openstreetmap/josm/tools/Shortcut.java
r8395 r8419 218 218 if (keyStroke == null) return ""; 219 219 String modifText = KeyEvent.getKeyModifiersText(keyStroke.getModifiers()); 220 if ("".equals (modifText)) return KeyEvent.getKeyText 221 return modifText + "+" + KeyEvent.getKeyText(keyStroke.getKeyCode 220 if ("".equals (modifText)) return KeyEvent.getKeyText(keyStroke.getKeyCode()); 221 return modifText + "+" + KeyEvent.getKeyText(keyStroke.getKeyCode()); 222 222 } 223 223 -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r8404 r8419 878 878 /** 879 879 * An alternative to {@link String#trim()} to effectively remove all leading and trailing white characters, including Unicode ones. 880 * @see <a href="http://closingbraces.net/2008/11/11/javastringtrim/">Java’s String.trim has a strange idea of whitespace</a>881 * @see <a href="https://bugs.openjdk.java.net/browse/JDK-4080617">JDK bug 4080617</a>882 880 * @param str The string to strip 883 881 * @return <code>str</code>, without leading and trailing characters, according to 884 882 * {@link Character#isWhitespace(char)} and {@link Character#isSpaceChar(char)}. 883 * @see <a href="http://closingbraces.net/2008/11/11/javastringtrim/">Java’s String.trim has a strange idea of whitespace</a> 884 * @see <a href="https://bugs.openjdk.java.net/browse/JDK-4080617">JDK bug 4080617</a> 885 885 * @since 5772 886 886 */ -
trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java
r8390 r8419 54 54 55 55 @Override 56 public void startElement 56 public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException { 57 57 if ("".equals(uri)) { 58 58 super.startElement(namespace, localName, qName, atts);
Note:
See TracChangeset
for help on using the changeset viewer.