- Timestamp:
- 2015-05-23T01:40:23+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 63 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java
r8393 r8419 32 32 * Aligns all selected nodes within a circle. (Useful for roundabouts) 33 33 * 34 * @since 14635 *36 34 * @author Matthew Newton 37 35 * @author Petr Dlouhý 38 36 * @author Teemu Koskinen 39 37 * @author Alain Delplanque 38 * 39 * @since 146 40 40 */ 41 41 public final class AlignInCircleAction extends JosmAction { -
trunk/src/org/openstreetmap/josm/actions/CloseChangesetAction.java
r8377 r8419 76 76 } 77 77 78 private class DownloadOpenChangesetsTask extends PleaseWaitRunnable {78 private final class DownloadOpenChangesetsTask extends PleaseWaitRunnable { 79 79 80 80 private boolean canceled; -
trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java
r8308 r8419 45 45 * BTW: Someone might want to implement projection corrections for this... 46 46 * 47 * @since 99648 *49 47 * @author Henry Loenwind 50 48 * @author Sebastian Masch 51 49 * @author Alain Delplanque 50 * 51 * @since 996 52 52 */ 53 53 public final class CreateCircleAction extends JosmAction { -
trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java
r8406 r8419 83 83 } 84 84 85 private static class CreateUpdateMultipolygonTask implements Runnable {85 private static final class CreateUpdateMultipolygonTask implements Runnable { 86 86 private final Collection<Way> selectedWays; 87 87 private final Relation multipolygonRelation; -
trunk/src/org/openstreetmap/josm/actions/DownloadNotesInViewAction.java
r8212 r8419 18 18 * No interaction is required. 19 19 */ 20 public class DownloadNotesInViewAction extends JosmAction {20 public final class DownloadNotesInViewAction extends JosmAction { 21 21 22 22 private DownloadNotesInViewAction(String iconName) { -
trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java
r8378 r8419 134 134 * @param filter The dialog file filter 135 135 * @return The output {@code File} 136 * @see DiskAccessAction#createAndOpenFileChooser(boolean, boolean, String, FileFilter, int, String) 136 137 * @since 5456 137 * @see DiskAccessAction#createAndOpenFileChooser(boolean, boolean, String, FileFilter, int, String)138 138 */ 139 139 public static File createAndOpenSaveFileChooser(String title, ExtensionFileFilter filter) { -
trunk/src/org/openstreetmap/josm/actions/UploadNotesAction.java
r8318 r8419 23 23 24 24 /** Create a new action to upload notes */ 25 public UploadNotesAction 25 public UploadNotesAction() { 26 26 putValue(SHORT_DESCRIPTION,tr("Upload note changes to server")); 27 27 putValue(NAME, tr("Upload notes")); -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmChangeTask.java
r8332 r8419 125 125 * Loads history and updates incomplete primitives. 126 126 */ 127 private static class HistoryLoaderAndListener extends HistoryLoadTask implements HistoryDataSetListener {127 private static final class HistoryLoaderAndListener extends HistoryLoadTask implements HistoryDataSetListener { 128 128 129 129 private final Map<OsmPrimitive, Date> toLoad; -
trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java
r8378 r8419 208 208 private void updateModeLocalPreferences() { 209 209 // @formatter:off 210 snapThreshold = Main.pref.getDouble 210 snapThreshold = Main.pref.getDouble(prefKey("snap-threshold-percent"), 0.70); 211 211 snapDefault = Main.pref.getBoolean(prefKey("snap-default"), true); 212 212 copyTagsDefault = Main.pref.getBoolean(prefKey("copy-tags-default"), true); -
trunk/src/org/openstreetmap/josm/actions/upload/FixDataHook.java
r8338 r8419 35 35 * Constructor for data initialization 36 36 */ 37 public FixDataHook 37 public FixDataHook() { 38 38 deprecated.add(new FixDataSpace()); 39 39 deprecated.add(new FixDataKey("color", "colour")); -
trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java
r8404 r8419 1005 1005 Map<String, String> stringMap = (Map<String, String>) engine.get("stringMap"); 1006 1006 @SuppressWarnings("unchecked") 1007 Map<String, List<String>> listMap = (SortedMap<String, List<String>> 1007 Map<String, List<String>> listMap = (SortedMap<String, List<String>>) engine.get("listMap"); 1008 1008 @SuppressWarnings("unchecked") 1009 1009 Map<String, List<Collection<String>>> listlistMap = (SortedMap<String, List<Collection<String>>>) engine.get("listlistMap"); -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r8404 r8419 441 441 /* ------*/ 442 442 443 private void updateFlagsNoLock 443 private void updateFlagsNoLock(int flag, boolean value) { 444 444 super.updateFlags(flag, value); 445 445 } -
trunk/src/org/openstreetmap/josm/data/osm/PrimitiveId.java
r5417 r8419 19 19 * Gets the type of object represented by this object. 20 20 * 21 * @return the object type 21 22 * @see Node 22 23 * @see Way 23 24 * @see Relation 24 * @return the object type25 25 */ 26 26 OsmPrimitiveType getType(); -
trunk/src/org/openstreetmap/josm/data/osm/Tag.java
r6699 r8419 102 102 /** 103 103 * This constructs a {@link Tag} by splitting {@code s} on the first equality sign. 104 * @see org.openstreetmap.josm.tools.TextTagParser105 104 * @param s the string to convert 106 105 * @return the constructed tag 106 * @see org.openstreetmap.josm.tools.TextTagParser 107 107 */ 108 108 public static Tag ofString(String s) { -
trunk/src/org/openstreetmap/josm/data/osm/Way.java
r8365 r8419 112 112 * 113 113 * @return the real number of nodes in this way. 114 * @since 5847115 114 * 116 115 * @see #getNodesCount() 117 116 * @see #isClosed() 117 * @since 5847 118 118 */ 119 119 public int getRealNodesCount() { -
trunk/src/org/openstreetmap/josm/data/osm/event/DataSetListener.java
r6380 r8419 5 5 * A listener listening for all DataSet changes. 6 6 * 7 * @author nenik 7 8 * @see DataSetListenerAdapter 8 * @author nenik9 9 */ 10 10 public interface DataSetListener { -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/LineClip.java
r8342 r8419 65 65 boolean done = false; 66 66 67 outcode0 = computeOutCode 68 outcode1 = computeOutCode 67 outcode0 = computeOutCode(x1, y1, xmin, ymin, xmax, ymax); 68 outcode1 = computeOutCode(x2, y2, xmin, ymin, xmax, ymax); 69 69 70 70 do { … … 115 115 * We cannot use Rectangle.outcode since it does not work with long ints. 116 116 */ 117 private static int computeOutCode 117 private static int computeOutCode(long x, long y, long xmin, long ymin, long xmax, long ymax) { 118 118 int code = 0; 119 119 if (y > ymax) { -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r8395 r8419 1320 1320 final double sy = l * (p1.y - p2.y); 1321 1321 1322 orientationArrows.moveTo 1322 orientationArrows.moveTo(p2.x + cosPHI * sx - sinPHI * sy, p2.y + sinPHI * sx + cosPHI * sy); 1323 1323 orientationArrows.lineTo(p2.x, p2.y); 1324 orientationArrows.lineTo 1324 orientationArrows.lineTo(p2.x + cosPHI * sx + sinPHI * sy, p2.y - sinPHI * sx + cosPHI * sy); 1325 1325 } 1326 1326 } … … 1351 1351 1352 1352 onewayPath.moveTo(x, y); 1353 onewayPath.lineTo 1354 onewayPath.lineTo 1353 onewayPath.lineTo(x + cosPHI * sx - sinPHI * sy, y + sinPHI * sx + cosPHI * sy); 1354 onewayPath.lineTo(x + cosPHI * sx + sinPHI * sy, y - sinPHI * sx + cosPHI * sy); 1355 1355 onewayPath.lineTo(x, y); 1356 1356 } -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java
r8395 r8419 432 432 final double sy = l * (p1.y - p2.y); 433 433 434 path.lineTo 435 path.moveTo 434 path.lineTo(p2.x + (int) Math.round(cosPHI * sx - sinPHI * sy), p2.y + (int) Math.round(sinPHI * sx + cosPHI * sy)); 435 path.moveTo(p2.x + (int) Math.round(cosPHI * sx + sinPHI * sy), p2.y + (int) Math.round(- sinPHI * sx + cosPHI * sy)); 436 436 path.lineTo(p2.x, p2.y); 437 437 } -
trunk/src/org/openstreetmap/josm/data/projection/proj/TransverseMercator.java
r8345 r8419 95 95 + (N_a / 5040.0 * pow(cos(phi), 7.0) * l7coef * pow(l, 7.0)), 96 96 /* Calculate northing (y) */ 97 ArcLengthOfMeridian 97 ArcLengthOfMeridian(phi) / a 98 98 + (t / 2.0 * N_a * pow(cos(phi), 2.0) * pow(l, 2.0)) 99 99 + (t / 24.0 * N_a * pow(cos(phi), 4.0) * l4coef * pow(l, 4.0)) -
trunk/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java
r8404 r8419 62 62 * @since Validator 1.4 63 63 */ 64 public class DomainValidator extends AbstractValidator {64 public final class DomainValidator extends AbstractValidator { 65 65 66 66 // Regular expression strings for hostnames (derived from RFC2396 and RFC 1123) -
trunk/src/org/openstreetmap/josm/data/validation/tests/Addresses.java
r8404 r8419 1 // License: GPL. See LICENSE file for details.1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.data.validation.tests; 3 3 -
trunk/src/org/openstreetmap/josm/gui/FileDrop.java
r8342 r8419 167 167 168 168 // Is it a file list? 169 if (tr.isDataFlavorSupported 169 if (tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { 170 170 171 171 // Say we'll take it. 172 evt.acceptDrop ( DnDConstants.ACTION_COPY);173 Main.trace("FileDrop: file list accepted." 172 evt.acceptDrop(DnDConstants.ACTION_COPY); 173 Main.trace("FileDrop: file list accepted."); 174 174 175 175 // Get a useful list … … 181 181 // Alert listener to drop. 182 182 if( listener != null ) { 183 listener.filesDropped( files);183 listener.filesDropped(files); 184 184 } 185 185 186 186 // Mark that drop is completed. 187 187 evt.getDropTargetContext().dropComplete(true); 188 Main.trace("FileDrop: drop complete." 188 Main.trace("FileDrop: drop complete."); 189 189 } else { 190 190 // this section will check for a reader flavor. … … 554 554 * <tt>application/x-net.iharder.dnd.TransferableObject</tt>. 555 555 * 556 * @see Fetcher557 556 * @param dataClass The {@link java.lang.Class} to use in the custom data flavor 558 557 * @param fetcher The {@link Fetcher} that will return the data object 558 * @see Fetcher 559 559 */ 560 560 public TransferableObject(Class<?> dataClass, Fetcher fetcher ) { -
trunk/src/org/openstreetmap/josm/gui/MainMenu.java
r8404 r8419 441 441 442 442 /** 443 * @return the default position of tnew top-level menus 443 444 * @since 6088 444 * @return the default position of tnew top-level menus445 445 */ 446 446 public int getDefaultMenuPos() { -
trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
r8413 r8419 724 724 * It solely depends on the distance to point p. 725 725 * 726 * @param p the point for which to search the nearest segment. 727 * @param ignore a collection of nodes which are not to be returned. 728 * @param predicate the returned objects have to fulfill certain properties. 729 * 726 730 * @return All nodes nearest to point p that are in a belt from 727 731 * dist(nearest) to dist(nearest)+4px around p and 728 732 * that are not in ignore. 729 *730 * @param p the point for which to search the nearest segment.731 * @param ignore a collection of nodes which are not to be returned.732 * @param predicate the returned objects have to fulfill certain properties.733 733 */ 734 734 public final List<Node> getNearestNodes(Point p, … … 771 771 * It solely depends on the distance to point p. 772 772 * 773 * @param p the point for which to search the nearest segment. 774 * @param predicate the returned objects have to fulfill certain properties. 775 * 773 776 * @return All nodes nearest to point p that are in a belt from 774 777 * dist(nearest) to dist(nearest)+4px around p. 775 778 * @see #getNearestNodes(Point, Collection, Predicate) 776 *777 * @param p the point for which to search the nearest segment.778 * @param predicate the returned objects have to fulfill certain properties.779 779 */ 780 780 public final List<Node> getNearestNodes(Point p, Predicate<OsmPrimitive> predicate) { … … 795 795 * 796 796 * Finally, if a node is not found at all, null is returned. 797 *798 * @return A node within snap-distance to point p,799 * that is chosen by the algorithm described.800 797 * 801 798 * @param p the screen point 802 799 * @param predicate this parameter imposes a condition on the returned object, e.g. 803 800 * give the nearest node that is tagged. 801 * 802 * @return A node within snap-distance to point p, 803 * that is chosen by the algorithm described. 804 804 */ 805 805 public final Node getNearestNode(Point p, Predicate<OsmPrimitive> predicate, boolean useSelected) { … … 965 965 * then, within groups of equally distant segments, prefer those that are selected. 966 966 * 967 * @return all segments within 10px of p that are not in ignore,968 * sorted by their perpendicular distance.969 *970 967 * @param p the point for which to search the nearest segments. 971 968 * @param ignore a collection of segments which are not to be returned. 972 969 * @param predicate the returned objects have to fulfill certain properties. 970 * 971 * @return all segments within 10px of p that are not in ignore, 972 * sorted by their perpendicular distance. 973 973 */ 974 974 public final List<WaySegment> getNearestWaySegments(Point p, … … 996 996 * The result *order* depends on the current map selection state. 997 997 * 998 * @param p the point for which to search the nearest segments. 999 * @param predicate the returned objects have to fulfill certain properties. 1000 * 998 1001 * @return all segments within 10px of p, sorted by their perpendicular distance. 999 1002 * @see #getNearestWaySegments(Point, Collection, Predicate) 1000 *1001 * @param p the point for which to search the nearest segments.1002 * @param predicate the returned objects have to fulfill certain properties.1003 1003 */ 1004 1004 public final List<WaySegment> getNearestWaySegments(Point p, Predicate<OsmPrimitive> predicate) { … … 1106 1106 * It solely depends on the perpendicular distance to point p. 1107 1107 * 1108 * @return all nearest ways to the screen point given that are not in ignore.1109 * @see #getNearestWaySegments(Point, Collection, Predicate)1110 *1111 1108 * @param p the point for which to search the nearest ways. 1112 1109 * @param ignore a collection of ways which are not to be returned. 1113 1110 * @param predicate the returned object has to fulfill certain properties. 1111 * 1112 * @return all nearest ways to the screen point given that are not in ignore. 1113 * @see #getNearestWaySegments(Point, Collection, Predicate) 1114 1114 */ 1115 1115 public final List<Way> getNearestWays(Point p, … … 1137 1137 * It solely depends on the perpendicular distance to point p. 1138 1138 * 1139 * @param p the point for which to search the nearest ways. 1140 * @param predicate the returned object has to fulfill certain properties. 1141 * 1139 1142 * @return all nearest ways to the screen point given. 1140 1143 * @see #getNearestWays(Point, Collection, Predicate) 1141 *1142 * @param p the point for which to search the nearest ways.1143 * @param predicate the returned object has to fulfill certain properties.1144 1144 */ 1145 1145 public final List<Way> getNearestWays(Point p, Predicate<OsmPrimitive> predicate) { … … 1175 1175 * If nothing is found, return an empty collection. 1176 1176 * 1177 * @param p The point on screen. 1178 * @param ignore a collection of ways which are not to be returned. 1179 * @param predicate the returned object has to fulfill certain properties. 1180 * 1177 1181 * @return Primitives nearest to the given screen point that are not in ignore. 1178 1182 * @see #getNearestNodes(Point, Collection, Predicate) 1179 1183 * @see #getNearestWays(Point, Collection, Predicate) 1180 *1181 * @param p The point on screen.1182 * @param ignore a collection of ways which are not to be returned.1183 * @param predicate the returned object has to fulfill certain properties.1184 1184 */ 1185 1185 public final List<OsmPrimitive> getNearestNodesOrWays(Point p, … … 1207 1207 * It solely depends on the distance to point p. 1208 1208 * 1209 * @param p The point on screen. 1210 * @param predicate the returned object has to fulfill certain properties. 1209 1211 * @return Primitives nearest to the given screen point. 1210 1212 * @see #getNearestNodesOrWays(Point, Collection, Predicate) 1211 *1212 * @param p The point on screen.1213 * @param predicate the returned object has to fulfill certain properties.1214 1213 */ 1215 1214 public final List<OsmPrimitive> getNearestNodesOrWays(Point p, Predicate<OsmPrimitive> predicate) { … … 1220 1219 * This is used as a helper routine to {@link #getNearestNodeOrWay(Point, Predicate, boolean)} 1221 1220 * It decides, whether to yield the node to be tested or look for further (way) candidates. 1222 *1223 * @return true, if the node fulfills the properties of the function body1224 1221 * 1225 1222 * @param osm node to check 1226 1223 * @param p point clicked 1227 1224 * @param use_selected whether to prefer selected nodes 1225 * @return true, if the node fulfills the properties of the function body 1228 1226 */ 1229 1227 private boolean isPrecedenceNode(Node osm, Point p, boolean use_selected) { … … 1452 1450 * Sets the current system of measurement. 1453 1451 * @param somKey The system of measurement key. Must be defined in {@link SystemOfMeasurement#ALL_SYSTEMS}. 1452 * @throws IllegalArgumentException if {@code somKey} is not known 1454 1453 * @since 6056 1455 * @throws IllegalArgumentException if {@code somKey} is not known1456 1454 */ 1457 1455 public static void setSystemOfMeasurement(String somKey) { -
trunk/src/org/openstreetmap/josm/gui/Notification.java
r6889 r8419 82 82 * @param content any Component to be shown 83 83 * 84 * @return the current Object, for convenience 84 85 * @see #setContent(java.lang.String) 85 * @return the current Object, for convenience86 86 */ 87 87 public Notification setContent(Component content) { … … 96 96 * you can use <br> and other markup directly. 97 97 * 98 * @return the current Object, for convenience 98 99 * @see #Notification(java.lang.String) 99 * @return the current Object, for convenience100 100 */ 101 101 public Notification setContent(String msg) { -
trunk/src/org/openstreetmap/josm/gui/actionsupport/LogShowDialog.java
r7937 r8419 23 23 24 24 25 public LogShowDialog 25 public LogShowDialog(String title, String msg, String log) { 26 26 super(Main.parent, title, new String[] {tr("OK")}); 27 27 setButtonIcons(new String[] {"ok.png"}); … … 32 32 JPanel p = new JPanel(new GridBagLayout()); 33 33 JLabel lbl = new JLabel(msg); 34 34 35 35 lbl.setFont(lbl.getFont().deriveFont(0, 14)); 36 36 37 37 p.add(lbl, GBC.eol().insets(5,0,5,0)); 38 38 JosmEditorPane txt = new JosmEditorPane(); … … 41 41 txt.setEditable(false); 42 42 txt.setOpaque(false); 43 43 44 44 JScrollPane sp = new JScrollPane(txt); 45 45 sp.setOpaque(false); 46 46 sp.setPreferredSize(new Dimension(600,300)); 47 48 47 48 49 49 p.add(sp, GBC.eop().insets(5,15,0,0).fill(GBC.HORIZONTAL)); 50 50 -
trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java
r8413 r8419 634 634 * Represents a rectangular area of tiles at a given zoom level. 635 635 */ 636 private static class TileBounds {636 private static final class TileBounds { 637 637 private Point min; 638 638 private Point max; … … 664 664 * The map view used in this bounding box chooser 665 665 */ 666 private static class TileBoundsMapView extends JMapViewer {666 private static final class TileBoundsMapView extends JMapViewer { 667 667 private Point min; 668 668 private Point max; -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java
r8377 r8419 782 782 * 783 783 */ 784 private class FreezeAction extends AbstractAction implements ItemListener, FreezeActionProperties {784 private final class FreezeAction extends AbstractAction implements ItemListener, FreezeActionProperties { 785 785 786 786 private FreezeAction() { -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java
r8401 r8419 269 269 } 270 270 271 class CancelAction extends AbstractAction {271 final class CancelAction extends AbstractAction { 272 272 273 273 private CancelAction() { … … 285 285 } 286 286 287 class ApplyAction extends AbstractAction implements PropertyChangeListener {287 final class ApplyAction extends AbstractAction implements PropertyChangeListener { 288 288 289 289 private ApplyAction() { … … 359 359 } 360 360 361 private static class StatisticsInfo {361 private static final class StatisticsInfo { 362 362 public int numTags; 363 363 public Map<OsmPrimitiveType, Integer> sourceInfo; … … 370 370 } 371 371 372 private static class StatisticsTableColumnModel extends DefaultTableColumnModel {372 private static final class StatisticsTableColumnModel extends DefaultTableColumnModel { 373 373 private StatisticsTableColumnModel() { 374 374 TableCellRenderer renderer = new StatisticsInfoRenderer(); … … 398 398 } 399 399 400 private static class StatisticsTableModel extends DefaultTableModel {400 private static final class StatisticsTableModel extends DefaultTableModel { 401 401 private static final String[] HEADERS = new String[] {tr("Paste ..."), tr("From ..."), tr("To ...") }; 402 402 private transient List<StatisticsInfo> data; … … 508 508 } 509 509 510 private static class StatisticsInfoTable extends JPanel {510 private static final class StatisticsInfoTable extends JPanel { 511 511 512 512 private JTable infoTable; -
trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
r8378 r8419 69 69 * 70 70 * @return the color used to paint conflicts 71 * @see #paintConflicts 71 72 * @since 1221 72 * @see #paintConflicts73 73 */ 74 74 public static Color getColor() { … … 442 442 } 443 443 444 class SelectAction extends AbstractSelectAction implements ListSelectionListener {444 final class SelectAction extends AbstractSelectAction implements ListSelectionListener { 445 445 private SelectAction() { 446 446 putValue("help", ht("/Dialog/ConflictList#SelectAction")); -
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListPopup.java
r8308 r8419 107 107 for (Action a : actions) { 108 108 if (a instanceof LayerAction) { 109 add 109 add(((LayerAction) a).createMenuComponent()); 110 110 } else { 111 111 add(new JMenuItem(a)); -
trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
r8413 r8419 569 569 public FixTask(Collection<TestError> testErrors) { 570 570 super(tr("Fixing errors ..."), false /* don't ignore exceptions */); 571 this.testErrors = testErrors == null ? new ArrayList<TestError> 571 this.testErrors = testErrors == null ? new ArrayList<TestError>(): testErrors; 572 572 } 573 573 -
trunk/src/org/openstreetmap/josm/gui/history/VersionTable.java
r8377 r8419 120 120 } 121 121 122 class MouseListener extends PopupMenuLauncher {122 final class MouseListener extends PopupMenuLauncher { 123 123 private MouseListener() { 124 124 super(popupMenu); -
trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java
r8395 r8419 343 343 protected JTextField nextTF; 344 344 345 public TFKeyListener 345 public TFKeyListener(CredentialDialog owner, JTextField currentTF, JTextField nextTF) { 346 346 this.owner = owner; 347 347 this.currentTF = currentTF; … … 371 371 372 372 @Override 373 public void keyTyped ( KeyEvent e ){373 public void keyTyped(KeyEvent e) { 374 374 } 375 375 } -
trunk/src/org/openstreetmap/josm/gui/layer/Layer.java
r8413 r8419 478 478 * When the user has chosen a file, checks the file extension, and confirms overwrite if needed. 479 479 * @return The output {@code File} 480 * @see SaveActionBase#createAndOpenSaveFileChooser 480 481 * @since 5459 481 * @see SaveActionBase#createAndOpenSaveFileChooser482 482 */ 483 483 public File createAndOpenSaveFileChooser() { -
trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java
r8404 r8419 320 320 } 321 321 322 private int modulo 322 private int modulo(int a, int b) { 323 323 return a % b >= 0 ? a%b : a%b+b; 324 324 } -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
r8395 r8419 254 254 components.add(new SynchronizeAudio()); 255 255 if (Main.pref.getBoolean("marker.traceaudio", true)) { 256 components.add 256 components.add(new MoveAudio()); 257 257 } 258 258 components.add(new JumpToNextMarker(this)); -
trunk/src/org/openstreetmap/josm/gui/mappaint/Environment.java
r8415 r8419 117 117 * @param count count of nodes in parent way or members in parent relation 118 118 * @return A clone of this environment, with the specified parent, index, and context set to {@link Context#LINK} 119 * @since 6175120 119 * @see #parent 121 120 * @see #index 121 * @since 6175 122 122 */ 123 123 public Environment withParentAndIndexAndLinkContext(OsmPrimitive parent, int index, int count) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
r8404 r8419 109 109 * @param test if <code>true</code> than the icon is request is tested 110 110 * @return image provider for icon (can be <code>null</code> when <code>test</code> is <code>true</code>). 111 * @see #getIcon(IconReference, int,int) 111 112 * @since 8097 112 * @see #getIcon(IconReference, int,int)113 113 */ 114 114 public static ImageProvider getIconProvider(IconReference ref, boolean test) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSource.java
r8297 r8419 114 114 * Closes the source input stream previously returned by {@link #getSourceInputStream()} and other linked resources, if applicable. 115 115 * @param is The source input stream that must be closed 116 * @see #getSourceInputStream() 116 117 * @since 6289 117 * @see #getSourceInputStream()118 118 */ 119 119 public void closeSourceInputStream(InputStream is) { … … 142 142 * 143 143 * @return image provider for default styles icon 144 * @see #getIconProvider() 144 145 * @since 8097 145 * @see #getIconProvider()146 146 */ 147 147 private static synchronized ImageProvider getDefaultIconProvider() { … … 156 156 * 157 157 * @return image provider for styles icon 158 * @see #getIconProvider() 158 159 * @since 8097 159 * @see #getIconProvider()160 160 */ 161 161 protected ImageProvider getSourceIconProvider() { -
trunk/src/org/openstreetmap/josm/gui/mappaint/xml/AreaPrototype.java
r6890 r8419 10 10 public boolean closed; // if true, it does not apply to unclosed ways 11 11 12 public AreaPrototype 12 public AreaPrototype(AreaPrototype a, Range range) { 13 13 super(range); 14 14 this.color = a.color; -
trunk/src/org/openstreetmap/josm/gui/mappaint/xml/IconPrototype.java
r6890 r8419 10 10 public Boolean annotate; 11 11 12 public IconPrototype 12 public IconPrototype(IconPrototype i, Range range) { 13 13 super(range); 14 14 this.icon = i.icon; -
trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java
r8308 r8419 319 319 * Loads preferences to UI controls 320 320 */ 321 public final void loadPreferences 321 public final void loadPreferences() { 322 322 makeAutoMarkers.setSelected(Main.pref.getBoolean("marker.makeautomarkers", true)); 323 323 if(layerName!=null && Main.pref.get("draw.rawgps.lines."+layerName).isEmpty() -
trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java
r8413 r8419 276 276 private class CbAction extends AbstractAction implements ListSelectionListener { 277 277 private PrefJPanel panel; 278 public CbAction 278 public CbAction(PrefJPanel panel) { 279 279 this.panel = panel; 280 280 } … … 359 359 try { 360 360 final TableRowSorter<? extends TableModel> sorter = 361 (TableRowSorter<? extends TableModel> 361 (TableRowSorter<? extends TableModel>)shortcutTable.getRowSorter(); 362 362 if (expr == null) { 363 363 sorter.setRowFilter(null); -
trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java
r8374 r8419 376 376 * Sets a global font for all UI, replacing default font of current look and feel. 377 377 * @param name Font name. It is up to the caller to make sure the font exists 378 * @throws IllegalArgumentException if name is null 378 379 * @since 7896 379 * @throws IllegalArgumentException if name is null380 380 */ 381 381 public static void setUIFont(String name) { -
trunk/src/org/openstreetmap/josm/gui/widgets/AbstractFileChooser.java
r8291 r8419 72 72 * file from a list in the UI. 73 73 * 74 * @return the selected file 74 75 * @see #setSelectedFile 75 * @return the selected file76 76 */ 77 77 public abstract File getSelectedFile(); … … 175 175 * to be the file's parent directory. 176 176 * 177 * @param file the selected file 177 178 * @see #getSelectedFile 178 *179 * @param file the selected file180 179 */ 181 180 public abstract void setSelectedFile(File file); -
trunk/src/org/openstreetmap/josm/gui/widgets/JosmPasswordField.java
r7937 r8419 19 19 * <a href="https://bugs.openjdk.java.net/browse/JDK-6322854">JDK bug 6322854</a>. 20 20 * 21 * @since 575222 21 * @see <a href="https://josm.openstreetmap.de/ticket/8404">https://josm.openstreetmap.de/ticket/8404</a> 23 22 * @see <a href="https://hg.netbeans.org/main/rev/33cb2e81b640">https://hg.netbeans.org/main/rev/33cb2e81b640</a> 23 * @since 5752 24 24 */ 25 25 public class JosmPasswordField extends JPasswordField implements FocusListener { -
trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java
r8415 r8419 687 687 688 688 /** 689 * The specified Node is either the wrong type or was configured 690 * incorrectly. 689 * The specified Node is either the wrong type or was configured incorrectly. 691 690 */ 692 691 public static class InvalidLayoutException extends RuntimeException { 693 692 private final transient Node node; 694 public InvalidLayoutException 693 public InvalidLayoutException(String msg, Node node) { 695 694 super(msg); 696 695 this.node = node; … … 897 896 * 898 897 * @param weight a double between 0.0 and 1.0 898 * @throws IllegalArgumentException if weight is not between 0.0 and 1.0 899 899 * @see #getWeight 900 900 * @see MultiSplitLayout#layoutContainer 901 * @throws IllegalArgumentException if weight is not between 0.0 and 1.0902 901 */ 903 902 public void setWeight(double weight) { … … 998 997 * 999 998 * @param children List of children 999 * @throws IllegalArgumentException if children is null 1000 1000 * @see #getChildren 1001 * @throws IllegalArgumentException if children is null1002 1001 */ 1003 1002 public void setChildren(List<Node> children) { … … 1220 1219 } 1221 1220 1222 private static Node parseModel 1221 private static Node parseModel(Reader r) { 1223 1222 StreamTokenizer st = new StreamTokenizer(r); 1224 1223 try { -
trunk/src/org/openstreetmap/josm/io/AbstractReader.java
r8378 r8419 91 91 if (n == null) { 92 92 if (id <= 0) 93 throw new IllegalDataException 93 throw new IllegalDataException( 94 94 tr("Way with external ID ''{0}'' includes missing node with external ID ''{1}''.", 95 95 externalWayId, -
trunk/src/org/openstreetmap/josm/io/CacheCustomContent.java
r8332 r8419 14 14 /** 15 15 * Use this class if you want to cache and store a single file that gets updated regularly. 16 * Unless you flush() it will be kept in memory. If you want to cache a lot of data and/or files, 17 * use CacheFiles16 * Unless you flush() it will be kept in memory. If you want to cache a lot of data and/or files, use CacheFiles. 17 * @author xeen 18 18 * @param <T> a {@link Throwable} that may be thrown during {@link #updateData()}, 19 19 * use {@link RuntimeException} if no exception must be handled. 20 * @author xeen21 20 * @since 1450 22 21 */ -
trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java
r8126 r8419 77 77 * @return The type of credentials agent 78 78 */ 79 public final Class<? extends CredentialsAgent> getCredentialsAgentClass 79 public final Class<? extends CredentialsAgent> getCredentialsAgentClass() { 80 80 return delegate.getClass(); 81 81 } -
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 (keyStroke.getKeyCode());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.