Changeset 15007 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2019-04-21T02:49:30+02:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
r14985 r15007 10 10 import java.awt.geom.Area; 11 11 import java.util.ArrayList; 12 import java.util.Arrays;13 12 import java.util.Collection; 14 import java.util.Collections;15 13 import java.util.HashSet; 16 14 import java.util.List; … … 111 109 112 110 /** 113 * A list of things we can zoom to. The zoom target is given depending on the mode.114 * @deprecated Use {@link AutoScaleMode} enum instead115 */116 @Deprecated117 public static final Collection<String> MODES = Collections.unmodifiableList(Arrays.asList(118 marktr(/* ICON(dialogs/autoscale/) */ "data"),119 marktr(/* ICON(dialogs/autoscale/) */ "layer"),120 marktr(/* ICON(dialogs/autoscale/) */ "selection"),121 marktr(/* ICON(dialogs/autoscale/) */ "conflict"),122 marktr(/* ICON(dialogs/autoscale/) */ "download"),123 marktr(/* ICON(dialogs/autoscale/) */ "problem"),124 marktr(/* ICON(dialogs/autoscale/) */ "previous"),125 marktr(/* ICON(dialogs/autoscale/) */ "next")));126 127 /**128 111 * One of {@link AutoScaleMode}. Defines what we are zooming to. 129 112 */ … … 171 154 /** 172 155 * Performs the auto scale operation of the given mode without the need to create a new action. 173 * @param mode One of {@link #MODES}.156 * @param mode One of {@link AutoScaleMode}. 174 157 * @since 14221 175 158 */ 176 159 public static void autoScale(AutoScaleMode mode) { 177 160 new AutoScaleAction(mode, false).autoScale(); 178 }179 180 /**181 * Performs the auto scale operation of the given mode without the need to create a new action.182 * @param mode One of {@link #MODES}.183 * @deprecated Use {@link #autoScale(AutoScaleMode)} instead184 */185 @Deprecated186 public static void autoScale(String mode) {187 autoScale(AutoScaleMode.of(mode));188 161 } 189 162 … … 221 194 /** 222 195 * Constructs a new {@code AutoScaleAction}. 223 * @param mode The autoscale mode (one of {@link AutoScaleAction#MODES}) 224 * @deprecated Use {@link #AutoScaleAction(AutoScaleMode)} instead 225 */ 226 @Deprecated 227 public AutoScaleAction(final String mode) { 228 this(AutoScaleMode.of(mode)); 229 } 230 231 /** 232 * Constructs a new {@code AutoScaleAction}. 233 * @param mode The autoscale mode (one of {@link AutoScaleAction#MODES}) 196 * @param mode The autoscale mode (one of {@link AutoScaleMode}) 234 197 * @since 14221 235 198 */ -
trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java
r14483 r15007 178 178 179 179 /** 180 * Convert the time stamp of the waypoint into seconds from the epoch.181 *182 * @deprecated Use {@link #setTime(Date)}, {@link #setTime(long)}, {@link #setTimeInMillis(long)}183 */184 @Deprecated185 public void setTime() {186 setTimeFromAttribute();187 }188 189 /**190 180 * Sets the {@link #PT_TIME} attribute to the specified time. 191 181 * … … 205 195 public void setTimeInMillis(long ts) { 206 196 attr.put(PT_TIME, new Date(ts)); 207 }208 209 /**210 * Convert the time stamp of the waypoint into seconds from the epoch.211 * @return The parsed time if successful, or {@code null}212 * @since 9383213 * @deprecated Use {@link #setTime(Date)}, {@link #setTime(long)}, {@link #setTimeInMillis(long)}214 */215 @Deprecated216 public Date setTimeFromAttribute() {217 Logging.warn("WayPoint.setTimeFromAttribute() is deprecated, please fix calling code");218 return getDate();219 197 } 220 198 -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r14905 r15007 10 10 import java.util.Collections; 11 11 import java.util.Date; 12 import java.util.LinkedHashSet;13 12 import java.util.List; 14 13 import java.util.Locale; … … 83 82 84 83 /** 85 * Replies the sub-collection of {@link OsmPrimitive}s of type <code>type</code> present in86 * another collection of {@link OsmPrimitive}s. The result collection is a list.87 *88 * If <code>list</code> is null, replies an empty list.89 *90 * @param <T> type of data (must be one of the {@link OsmPrimitive} types91 * @param list the original list92 * @param type the type to filter for93 * @return the sub-list of OSM primitives of type <code>type</code>94 * @deprecated Use {@link Stream} or {@link Utils#filteredCollection(Collection, Class)} instead.95 */96 @Deprecated97 public static <T extends OsmPrimitive> List<T> getFilteredList(Collection<OsmPrimitive> list, Class<T> type) {98 return (list != null ? list.stream() : Stream.empty())99 .filter(type::isInstance)100 .map(type::cast)101 .collect(Collectors.toList());102 }103 104 /**105 * Replies the sub-collection of {@link OsmPrimitive}s of type <code>type</code> present in106 * another collection of {@link OsmPrimitive}s. The result collection is a set.107 *108 * If <code>list</code> is null, replies an empty set.109 *110 * @param <T> type of data (must be one of the {@link OsmPrimitive} types111 * @param set the original collection112 * @param type the type to filter for113 * @return the sub-set of OSM primitives of type <code>type</code>114 * @deprecated Use {@link Stream} instead115 */116 @Deprecated117 public static <T extends OsmPrimitive> Set<T> getFilteredSet(Collection<OsmPrimitive> set, Class<T> type) {118 return (set != null ? set.stream() : Stream.empty())119 .filter(type::isInstance)120 .map(type::cast)121 .collect(Collectors.toCollection(LinkedHashSet::new));122 }123 124 /**125 84 * Replies the collection of referring primitives for the primitives in <code>primitives</code>. 126 85 * -
trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java
r14518 r15007 216 216 * @param tag The tag 217 217 * @return The number of times this tag is used in this collection. 218 * @since 10736219 * @deprecated use {@link #getTagOccurrence}220 */221 @Deprecated222 public int getTagOccurence(Tag tag) {223 return getTagOccurrence(tag);224 }225 226 /**227 * Gets the number of times this tag was added to the collection.228 * @param tag The tag229 * @return The number of times this tag is used in this collection.230 218 * @since 14302 231 219 */ -
trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java
r14373 r15007 111 111 112 112 /** 113 * Compute Levenshtein distance114 *115 * @param s First word116 * @param t Second word117 * @return The distance between words118 * @deprecated Use {@link Utils#getLevenshteinDistance} instead119 */120 @Deprecated121 public static int getLevenshteinDistance(String s, String t) {122 return Utils.getLevenshteinDistance(s, t);123 }124 125 /**126 113 * Add a regular expression rule. 127 114 * @param regExpr the regular expression to search for -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r14977 r15007 217 217 private static final MainLayerManager layerManager = new MainLayerManager(); 218 218 219 /**220 * The commands undo/redo handler.221 * @since 12641222 * @deprecated Use {@link UndoRedoHandler#getInstance}223 */224 @Deprecated225 public static final UndoRedoHandler undoRedo = UndoRedoHandler.getInstance();226 227 219 private static final LayerChangeListener undoRedoCleaner = new LayerChangeListener() { 228 220 @Override -
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialog.java
r14465 r15007 124 124 } 125 125 126 /**127 * Removes this history browser model as listener for data change and layer change events.128 * @deprecated not needeed anymore, job is done in {@link #dispose}129 */130 @Deprecated131 public void unlinkAsListener() {132 getHistoryBrowser().getModel().unlinkAsListener();133 }134 135 126 /* ---------------------------------------------------------------------------------- */ 136 127 /* interface HistoryDataSetListener */ -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r14802 r15007 696 696 697 697 /** 698 * Clears the currentPhoto, i.e. remove select marker, and optionally repaint.699 * @param repaint Repaint flag700 * @deprecated Use {@link ImageData#clearSelectedImage}701 * @since 6392702 */703 @Deprecated704 public void clearCurrentPhoto(boolean repaint) {705 data.clearSelectedImage();706 if (repaint) {707 updateBufferAndRepaint();708 }709 }710 711 /**712 698 * Clears the currentPhoto of the other GeoImageLayer's. Otherwise there could be multiple selected photos. 713 699 */ -
trunk/src/org/openstreetmap/josm/io/OsmApi.java
r14436 r15007 36 36 import org.openstreetmap.josm.io.auth.CredentialsManager; 37 37 import org.openstreetmap.josm.spi.preferences.Config; 38 import org.openstreetmap.josm.spi.preferences.IUrls;39 38 import org.openstreetmap.josm.tools.CheckParameterUtil; 40 39 import org.openstreetmap.josm.tools.HttpClient; … … 70 69 */ 71 70 public static final int MAX_DOWNLOAD_THREADS = 2; 72 73 /**74 * Default URL of the standard OSM API.75 * @deprecated Use {@link IUrls#getDefaultOsmApiUrl}76 * @since 542277 */78 @Deprecated79 public static final String DEFAULT_API_URL = "https://api.openstreetmap.org/api";80 71 81 72 // The collection of instantiated OSM APIs -
trunk/src/org/openstreetmap/josm/tools/PlatformHook.java
r14689 r15007 124 124 125 125 /** 126 * The makeTooltip hook will be called whenever a tooltip for127 * a menu or button is created.128 *129 * Tooltips are usually not system dependent, unless the130 * JVM is too dumb to provide correct names for all the keys.131 *132 * Some LAFs don't understand HTML, such as the OSX LAFs.133 *134 * @param name Tooltip text to display135 * @param sc Shortcut associated (to display accelerator between parenthesis)136 * @return Full tooltip text (name + accelerator)137 * @since 1084138 * @deprecated Use {@link Shortcut#makeTooltip} instead.139 */140 @Deprecated141 default String makeTooltip(String name, Shortcut sc) {142 return Shortcut.makeTooltip(name, sc != null ? sc.getKeyStroke() : null);143 }144 145 /**146 126 * Returns the default LAF to be used on this platform to look almost as a native application. 147 127 * @return The default native LAF for this platform -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r14977 r15007 17 17 import java.io.InputStream; 18 18 import java.io.UnsupportedEncodingException; 19 import java.lang.reflect.AccessibleObject;20 19 import java.net.MalformedURLException; 21 20 import java.net.URL; … … 1554 1553 1555 1554 /** 1556 * Sets {@code AccessibleObject}(s) accessible.1557 * @param objects objects1558 * @see AccessibleObject#setAccessible1559 * @deprecated Use {@link ReflectionUtils#setObjectsAccessible(AccessibleObject...)}1560 * @since 102231561 */1562 @Deprecated1563 public static void setObjectsAccessible(final AccessibleObject... objects) {1564 ReflectionUtils.setObjectsAccessible(objects);1565 }1566 1567 /**1568 1555 * Clamp a value to the given range 1569 1556 * @param val The value
Note:
See TracChangeset
for help on using the changeset viewer.