Changeset 6362 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2013-11-03T01:06:23+01:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 23 edited
-
AudioPlayer.java (modified) (1 diff)
-
AudioUtil.java (modified) (1 diff)
-
Base64.java (modified) (1 diff)
-
CheckParameterUtil.java (modified) (1 diff)
-
ColorHelper.java (modified) (1 diff)
-
CopyList.java (modified) (6 diffs)
-
DateParser.java (modified) (1 diff)
-
ExceptionUtil.java (modified) (1 diff)
-
ExifReader.java (modified) (1 diff)
-
GBC.java (modified) (1 diff)
-
Geometry.java (modified) (1 diff)
-
I18n.java (modified) (1 diff)
-
InputMapUtils.java (modified) (2 diffs)
-
LanguageInfo.java (modified) (1 diff)
-
MultikeyActionsHandler.java (modified) (1 diff)
-
OpenBrowser.java (modified) (1 diff)
-
OsmUrlToBounds.java (modified) (1 diff)
-
PlatformHookUnixoid.java (modified) (1 diff)
-
Shortcut.java (modified) (1 diff)
-
TaggingPresetNameTemplateList.java (modified) (1 diff)
-
TextTagParser.java (modified) (1 diff)
-
Utils.java (modified) (1 diff)
-
template_engine/CompoundTemplateEntry.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java
r6310 r6362 22 22 * @since 547 23 23 */ 24 public class AudioPlayer extends Thread { 24 public final class AudioPlayer extends Thread { 25 25 26 26 private static AudioPlayer audioPlayer = null; -
trunk/src/org/openstreetmap/josm/tools/AudioUtil.java
r6070 r6362 17 17 * @since 1462 18 18 */ 19 public class AudioUtil { 19 public final class AudioUtil { 20 20 21 private AudioUtil() { 22 // Hide default constructor for utils classes 23 } 24 21 25 /** 22 26 * Returns calibrated length of recording in seconds. -
trunk/src/org/openstreetmap/josm/tools/Base64.java
r3840 r6362 4 4 import java.nio.ByteBuffer; 5 5 6 public class Base64 { 6 public final class Base64 { 7 7 8 private Base64() { 9 // Hide default constructor for utils classes 10 } 11 8 12 private static String encDefault = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 9 13 private static String encUrlSafe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; -
trunk/src/org/openstreetmap/josm/tools/CheckParameterUtil.java
r5980 r6362 12 12 * This utility class provides a collection of static helper methods for checking 13 13 * parameters at run-time. 14 * @ince 2711 14 * @since 2711 15 15 */ 16 public class CheckParameterUtil { 16 public final class CheckParameterUtil { 17 17 18 private CheckParameterUtil(){} 18 private CheckParameterUtil() { 19 // Hide default constructor for utils classes 20 } 19 21 20 22 /** -
trunk/src/org/openstreetmap/josm/tools/ColorHelper.java
r6360 r6362 7 7 * Helper to convert from color to html string and back 8 8 */ 9 public class ColorHelper { 9 public final class ColorHelper { 10 10 11 11 private ColorHelper() { -
trunk/src/org/openstreetmap/josm/tools/CopyList.java
r6084 r6362 56 56 57 57 // read-only access: 58 public @Override E get(int index) { 58 @Override 59 public E get(int index) { 59 60 rangeCheck(index); 60 61 return array[index]; 61 62 } 62 63 63 public @Override int size() { 64 @Override 65 public int size() { 64 66 return size; 65 67 } 66 68 67 69 // modification: 68 public @Override E set(int index, E element) { 70 @Override 71 public E set(int index, E element) { 69 72 rangeCheck(index); 70 73 changeCheck(); … … 76 79 77 80 // full resizable semantics: 78 public @Override void add(int index, E element) { 81 @Override 82 public void add(int index, E element) { 79 83 // range check 80 84 ensureCapacity(size+1); … … 86 90 } 87 91 88 public @Override E remove(int index) { 92 @Override 93 public E remove(int index) { 89 94 rangeCheck(index); 90 95 changeCheck(); … … 102 107 103 108 // speed optimizations: 104 public @Override boolean add(E element) { 109 @Override 110 public boolean add(E element) { 105 111 ensureCapacity(size+1); 106 112 changeCheck(); … … 109 115 } 110 116 111 public @Override void clear() { 117 @Override 118 public void clear() { 112 119 modCount++; 113 120 … … 125 132 * @return a clone of this <tt>CopyList</tt> instance 126 133 */ 127 public @Override Object clone() { 134 @Override 135 public Object clone() { 128 136 return new CopyList<E>(array, size); 129 137 } -
trunk/src/org/openstreetmap/josm/tools/DateParser.java
r2512 r6362 10 10 * @author Immanuel.Scholz 11 11 */ 12 public class DateParser { 12 public final class DateParser { 13 14 private DateParser() { 15 // Hide default constructor for utils classes 16 } 17 13 18 public static Date parse(String d) throws ParseException { 14 19 return new PrimaryDateParser().parse(d); -
trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java
r6248 r6362 37 37 38 38 @SuppressWarnings("CallToThreadDumpStack") 39 public class ExceptionUtil { 39 public final class ExceptionUtil { 40 40 41 private ExceptionUtil() { 42 // Hide default constructor for utils classes 41 43 } 42 44 -
trunk/src/org/openstreetmap/josm/tools/ExifReader.java
r6360 r6362 25 25 * @since 99 26 26 */ 27 public class ExifReader { 27 public final class ExifReader { 28 28 29 29 private ExifReader() { -
trunk/src/org/openstreetmap/josm/tools/GBC.java
r5275 r6362 15 15 * @author imi 16 16 */ 17 public class GBC extends GridBagConstraints { 17 public final class GBC extends GridBagConstraints { 18 18 19 19 /** -
trunk/src/org/openstreetmap/josm/tools/Geometry.java
r6316 r6362 30 30 * @author viesturs 31 31 */ 32 public class Geometry { 32 public final class Geometry { 33 34 private Geometry() { 35 // Hide default constructor for utils classes 36 } 37 33 38 public enum PolygonIntersection {FIRST_INSIDE_SECOND, SECOND_INSIDE_FIRST, OUTSIDE, CROSSING} 34 39 -
trunk/src/org/openstreetmap/josm/tools/I18n.java
r6360 r6362 31 31 * @author Immanuel.Scholz 32 32 */ 33 public class I18n { 33 public final class I18n { 34 34 35 35 private I18n() { -
trunk/src/org/openstreetmap/josm/tools/InputMapUtils.java
r6070 r6362 16 16 * 17 17 */ 18 public class InputMapUtils { 19 public static void unassignCtrlShiftUpDown(JComponent cmp, int condition) { 18 public final class InputMapUtils { 19 20 private InputMapUtils() { 21 // Hide default constructor for utils classes 22 } 23 24 public static void unassignCtrlShiftUpDown(JComponent cmp, int condition) { 20 25 InputMap inputMap=SwingUtilities.getUIInputMap(cmp, condition); 21 26 inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_UP,InputEvent.CTRL_MASK|InputEvent.SHIFT_MASK)); … … 24 29 inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN,InputEvent.ALT_MASK|InputEvent.SHIFT_MASK)); 25 30 SwingUtilities.replaceUIInputMap(cmp,JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,inputMap); 26 }31 } 27 32 28 29 /** 30 * Enable activating button on Enter (which is replaced with spacebar for certain Look-And-Feels) 31 */ 32 public static void enableEnter(JButton b) { 33 /** 34 * Enable activating button on Enter (which is replaced with spacebar for certain Look-And-Feels) 35 */ 36 public static void enableEnter(JButton b) { 33 37 b.setFocusable(true); 34 38 b.getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "enter"); 35 39 b.getActionMap().put("enter",b.getAction()); 36 }40 } 37 41 38 public static void addEnterAction(JComponent c, Action a) {42 public static void addEnterAction(JComponent c, Action a) { 39 43 c.getActionMap().put("enter", a); 40 44 c.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "enter"); 41 }45 } 42 46 43 public static void addSpacebarAction(JComponent c, Action a) {47 public static void addSpacebarAction(JComponent c, Action a) { 44 48 c.getActionMap().put("spacebar", a); 45 49 c.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0), "spacebar"); 46 } 47 50 } 48 51 } -
trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java
r6360 r6362 4 4 import java.util.Locale; 5 5 6 public class LanguageInfo { 6 public final class LanguageInfo { 7 7 8 8 private LanguageInfo() { -
trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java
r6223 r6362 27 27 import org.openstreetmap.josm.tools.MultikeyShortcutAction.MultikeyInfo; 28 28 29 public class MultikeyActionsHandler { 29 public final class MultikeyActionsHandler { 30 30 31 31 private static final long DIALOG_DELAY = 1000; -
trunk/src/org/openstreetmap/josm/tools/OpenBrowser.java
r6360 r6362 20 20 * @author Imi 21 21 */ 22 public class OpenBrowser { 22 public final class OpenBrowser { 23 23 24 24 private OpenBrowser() { -
trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java
r6317 r6362 13 13 import org.openstreetmap.josm.data.coor.LatLon; 14 14 15 public class OsmUrlToBounds { 15 public final class OsmUrlToBounds { 16 16 private static final String SHORTLINK_PREFIX = "http://osm.org/go/"; 17 18 private OsmUrlToBounds() { 19 // Hide default constructor for utils classes 20 } 17 21 18 22 public static Bounds parse(String url) { -
trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
r6310 r6362 12 12 import java.io.InputStreamReader; 13 13 import java.util.Arrays; 14 import java.util.List;15 14 16 15 import org.openstreetmap.josm.Main; -
trunk/src/org/openstreetmap/josm/tools/Shortcut.java
r6316 r6362 34 34 * 35 35 */ 36 public class Shortcut { 36 public final class Shortcut { 37 37 private String shortText; // the unique ID of the shortcut 38 38 private String longText; // a human readable description that will be shown in the preferences -
trunk/src/org/openstreetmap/josm/tools/TaggingPresetNameTemplateList.java
r6068 r6362 15 15 * List of tagging presets with name templates, allows to find appropriate template based on existing primitive 16 16 */ 17 public class TaggingPresetNameTemplateList { 17 public final class TaggingPresetNameTemplateList { 18 18 19 19 private static TaggingPresetNameTemplateList instance; -
trunk/src/org/openstreetmap/josm/tools/TextTagParser.java
r6360 r6362 27 27 * Class that helps to parse tags from arbitrary text 28 28 */ 29 public class TextTagParser { 29 public final class TextTagParser { 30 30 31 31 // properties need JOSM restart to apply, modified rarely enough -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r6360 r6362 45 45 * Basic utils, that can be useful in different parts of the program. 46 46 */ 47 public class Utils { 47 public final class Utils { 48 48 49 49 private Utils() { -
trunk/src/org/openstreetmap/josm/tools/template_engine/CompoundTemplateEntry.java
r4282 r6362 3 3 4 4 5 public class CompoundTemplateEntry implements TemplateEntry { 5 public final class CompoundTemplateEntry implements TemplateEntry { 6 6 7 7 public static TemplateEntry fromArray(TemplateEntry... entry) {
Note:
See TracChangeset
for help on using the changeset viewer.
