Changeset 8374 in josm
- Timestamp:
- 2015-05-17T02:56:15+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/corrector/ReverseWayNoTagCorrector.java
r7937 r8374 51 51 * @return tags that imply a semantic meaning from <code>way</code> direction and cannot be changed 52 52 */ 53 public static finalTagCollection getDirectionalTags(Way way) {53 public static TagCollection getDirectionalTags(Way way) { 54 54 return directionalTags.intersect(TagCollection.from(way)); 55 55 } -
trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java
r8180 r8374 103 103 * @return The reversed tag (is equal to <code>tag</code> if no change is needed) 104 104 */ 105 public static finalTag apply(final Tag tag) {105 public static Tag apply(final Tag tag) { 106 106 return apply(tag.getKey(), tag.getValue()); 107 107 } … … 113 113 * @return The reversed tag (is equal to <code>key=value</code> if no change is needed) 114 114 */ 115 public static finalTag apply(final String key, final String value) {115 public static Tag apply(final String key, final String value) { 116 116 String newKey = key; 117 117 String newValue = value; -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/MultipolygonCache.java
r7937 r8374 58 58 * @return the unique instance 59 59 */ 60 public static finalMultipolygonCache getInstance() {60 public static MultipolygonCache getInstance() { 61 61 return INSTANCE; 62 62 } … … 147 147 } 148 148 149 private static finalboolean isMultipolygon(OsmPrimitive p) {149 private static boolean isMultipolygon(OsmPrimitive p) { 150 150 return p instanceof Relation && ((Relation) p).isMultipolygon(); 151 151 } -
trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2Util.java
r7294 r8374 38 38 * @return the int 39 39 */ 40 public static finalint getIntLE(byte[] b, int i) {40 public static int getIntLE(byte[] b, int i) { 41 41 return (b[i++] & 0x000000FF) | ((b[i++] << 8) & 0x0000FF00) | ((b[i++] << 16) & 0x00FF0000) | (b[i] << 24); 42 42 } … … 48 48 * @return the int 49 49 */ 50 public static finalint getIntBE(byte[] b, int i) {50 public static int getIntBE(byte[] b, int i) { 51 51 return (b[i++] << 24) | ((b[i++] << 16) & 0x00FF0000) | ((b[i++] << 8) & 0x0000FF00) | (b[i] & 0x000000FF); 52 52 } … … 59 59 * @return the int 60 60 */ 61 public static finalint getInt(byte[] b, boolean bigEndian) {61 public static int getInt(byte[] b, boolean bigEndian) { 62 62 if (bigEndian) 63 63 return getIntBE(b, 0); … … 73 73 * @return the float 74 74 */ 75 public static f inal float getFloat(byte[] b, boolean bigEndian) {75 public static float getFloat(byte[] b, boolean bigEndian) { 76 76 int i = 0; 77 77 if (bigEndian) { … … 90 90 * @return the double 91 91 */ 92 public static finaldouble getDouble(byte[] b, boolean bigEndian) {92 public static double getDouble(byte[] b, boolean bigEndian) { 93 93 int i = 0; 94 94 int j = 0; -
trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java
r7100 r8374 67 67 * @return {@code true}, if the provider has been added, {@code false} otherwise 68 68 */ 69 public static finalboolean registerSourceProvider(SourceProvider provider) {69 public static boolean registerSourceProvider(SourceProvider provider) { 70 70 if (provider != null) 71 71 return presetSourceProviders.add(provider); -
trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java
r8323 r8374 153 153 * @return true if the user wants to cancel, false if they want to continue 154 154 */ 155 public static finalboolean warnUser(String title, String content, ImageIcon baseActionIcon, String continueToolTip) {155 public static boolean warnUser(String title, String content, ImageIcon baseActionIcon, String continueToolTip) { 156 156 ExtendedDialog dlg = new ExtendedDialog(Main.parent, 157 157 title, new String[] {tr("Cancel"), tr("Continue")}); … … 177 177 * @since 7312 178 178 */ 179 public static finalvoid notifyUserHtmlError(Component parent, String title, String message, String html) {179 public static void notifyUserHtmlError(Component parent, String title, String message, String html) { 180 180 JPanel p = new JPanel(new GridBagLayout()); 181 181 p.add(new JLabel(message), GBC.eol()); … … 197 197 * @since 5484 198 198 */ 199 public static finalImage getDisabledImage(Image image) {199 public static Image getDisabledImage(Image image) { 200 200 return Toolkit.getDefaultToolkit().createImage( 201 201 new FilteredImageSource(image.getSource(), new GrayFilter(true, 20))); … … 208 208 * @since 5484 209 209 */ 210 public static finalImageIcon getDisabledIcon(ImageIcon icon) {210 public static ImageIcon getDisabledIcon(ImageIcon icon) { 211 211 return new ImageIcon(getDisabledImage(icon.getImage())); 212 212 } … … 221 221 * @since 5493 222 222 */ 223 public static finalComponent prepareResizeableOptionPane(final Component pane, final Dimension minDimension) {223 public static Component prepareResizeableOptionPane(final Component pane, final Dimension minDimension) { 224 224 if (pane != null) { 225 225 pane.addHierarchyListener(new HierarchyListener() { … … 250 250 * @since 5735 251 251 */ 252 public static finalTimer scheduleTimer(int initialDelay, ActionListener actionListener, boolean repeats) {252 public static Timer scheduleTimer(int initialDelay, ActionListener actionListener, boolean repeats) { 253 253 Timer timer = new Timer(initialDelay, actionListener); 254 254 timer.setRepeats(repeats); -
trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
r8285 r8374 282 282 * @since 5849 283 283 */ 284 public static finalUrlLabel getBugReportUrlLabel(String debugText) {284 public static UrlLabel getBugReportUrlLabel(String debugText) { 285 285 URL url = getBugReportUrl(debugText); 286 286 if (url != null) { -
trunk/src/org/openstreetmap/josm/tools/I18n.java
r8373 r8374 197 197 * @see #trnc 198 198 */ 199 public static finalString tr(String text, Object... objects) {199 public static String tr(String text, Object... objects) { 200 200 if (text == null) return null; 201 201 return MessageFormat.format(gettext(text, null), objects); … … 214 214 * @see #trnc 215 215 */ 216 public static finalString trc(String context, String text) {216 public static String trc(String context, String text) { 217 217 if (context == null) 218 218 return tr(text); … … 222 222 } 223 223 224 public static finalString trc_lazy(String context, String text) {224 public static String trc_lazy(String context, String text) { 225 225 if (context == null) 226 226 return tr(text); … … 240 240 * @return {@code text} unmodified. 241 241 */ 242 public static finalString marktr(String text) {242 public static String marktr(String text) { 243 243 return text; 244 244 } 245 245 246 public static finalString marktrc(String context, String text) {246 public static String marktrc(String context, String text) { 247 247 return text; 248 248 } … … 271 271 * @see #trnc 272 272 */ 273 public static finalString trn(String singularText, String pluralText, long n, Object... objects) {273 public static String trn(String singularText, String pluralText, long n, Object... objects) { 274 274 return MessageFormat.format(gettextn(singularText, pluralText, null, n), objects); 275 275 } … … 298 298 * @see #trn 299 299 */ 300 public static finalString trnc(String context, String singularText, String pluralText, long n, Object... objects) {300 public static String trnc(String context, String singularText, String pluralText, long n, Object... objects) { 301 301 return MessageFormat.format(gettextn(singularText, pluralText, context, n), objects); 302 302 } 303 303 304 private static finalString gettext(String text, String ctx, boolean lazy) {304 private static String gettext(String text, String ctx, boolean lazy) { 305 305 int i; 306 306 if(ctx == null && text.startsWith("_:") && (i = text.indexOf('\n')) >= 0) { … … 322 322 } 323 323 324 private static finalString gettext(String text, String ctx) {324 private static String gettext(String text, String ctx) { 325 325 return gettext(text, ctx, false); 326 326 } 327 327 328 328 /* try without context, when context try fails */ 329 private static finalString gettext_lazy(String text, String ctx) {329 private static String gettext_lazy(String text, String ctx) { 330 330 return gettext(text, ctx, true); 331 331 } 332 332 333 private static finalString gettextn(String text, String plural, String ctx, long num) {333 private static String gettextn(String text, String plural, String ctx, long num) { 334 334 int i; 335 335 if(ctx == null && text.startsWith("_:") && (i = text.indexOf('\n')) >= 0) { … … 360 360 * @return an array of locale objects. 361 361 */ 362 public static finalLocale[] getAvailableTranslations() {362 public static Locale[] getAvailableTranslations() { 363 363 Collection<Locale> v = new ArrayList<>(languages.size()); 364 364 if(getTranslationFile("en") != null) { -
trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java
r8322 r8374 151 151 * @since 7299 152 152 */ 153 public static finalSimpleDateFormat newIsoDateFormat() {153 public static SimpleDateFormat newIsoDateFormat() { 154 154 return new SimpleDateFormat("yyyy-MM-dd"); 155 155 } … … 160 160 * @since 7299 161 161 */ 162 public static finalSimpleDateFormat newIsoDateTimeFormat() {162 public static SimpleDateFormat newIsoDateTimeFormat() { 163 163 return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX"); 164 164 } … … 169 169 * @since 7299 170 170 */ 171 public static finalSimpleDateFormat newOsmApiDateTimeFormat() {171 public static SimpleDateFormat newOsmApiDateTimeFormat() { 172 172 // Example: "2010-09-07 14:39:41 UTC". 173 173 // Always parsed with US locale regardless of the current locale in JOSM … … 181 181 * @since 7299 182 182 */ 183 public static finalDateFormat getDateFormat(int dateStyle) {183 public static DateFormat getDateFormat(int dateStyle) { 184 184 if (PROP_ISO_DATES.get()) { 185 185 return newIsoDateFormat(); … … 196 196 * @since 7299 197 197 */ 198 public static finalString formatDate(Date date, int dateStyle) {198 public static String formatDate(Date date, int dateStyle) { 199 199 CheckParameterUtil.ensureParameterNotNull(date, "date"); 200 200 return getDateFormat(dateStyle).format(date); … … 207 207 * @since 7299 208 208 */ 209 public static finalDateFormat getTimeFormat(int timeStyle) {209 public static DateFormat getTimeFormat(int timeStyle) { 210 210 if (PROP_ISO_DATES.get()) { 211 211 // This is not strictly conform to ISO 8601. We just want to avoid US-style times such as 3.30pm … … 222 222 * @since 7299 223 223 */ 224 public static finalString formatTime(Date time, int timeStyle) {224 public static String formatTime(Date time, int timeStyle) { 225 225 CheckParameterUtil.ensureParameterNotNull(time, "time"); 226 226 return getTimeFormat(timeStyle).format(time); … … 234 234 * @since 7299 235 235 */ 236 public static finalDateFormat getDateTimeFormat(int dateStyle, int timeStyle) {236 public static DateFormat getDateTimeFormat(int dateStyle, int timeStyle) { 237 237 if (PROP_ISO_DATES.get()) { 238 238 // This is not strictly conform to ISO 8601. We just want to avoid US-style times such as 3.30pm … … 252 252 * @since 7299 253 253 */ 254 public static finalString formatDateTime(Date datetime, int dateStyle, int timeStyle) {254 public static String formatDateTime(Date datetime, int dateStyle, int timeStyle) { 255 255 CheckParameterUtil.ensureParameterNotNull(datetime, "datetime"); 256 256 return getDateTimeFormat(dateStyle, timeStyle).format(datetime);
Note:
See TracChangeset
for help on using the changeset viewer.