Changeset 6986 in josm
- Timestamp:
- 2014-04-16T00:54:15+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
r6889 r6986 48 48 49 49 /** 50 * Construct or50 * Constructs a new {@code OrthogonalizeAction}. 51 51 */ 52 52 public OrthogonalizeAction() { … … 519 519 */ 520 520 private static class EN { 521 private EN() { 522 // Hide implicit public constructor for utility class 523 } 521 524 // rotate counter-clock-wise 522 525 public static EastNorth rotate_cc(EastNorth pivot, EastNorth en, double angle) { -
trunk/src/org/openstreetmap/josm/actions/UnJoinNodeWayAction.java
r6380 r6986 10 10 import java.util.ArrayList; 11 11 import java.util.Collection; 12 import java.util.Collections;13 12 import java.util.Iterator; 14 13 import java.util.List; … … 18 17 import org.openstreetmap.josm.Main; 19 18 import org.openstreetmap.josm.command.RemoveNodesCommand; 20 import org.openstreetmap.josm.command.Command;21 19 import org.openstreetmap.josm.data.osm.Node; 22 20 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 24 22 import org.openstreetmap.josm.tools.Shortcut; 25 23 24 /** 25 * Disconnect nodes from a way they currently belong to. 26 * @since 6253 27 */ 26 28 public class UnJoinNodeWayAction extends JosmAction { 29 30 /** 31 * Constructs a new {@code UnJoinNodeWayAction}. 32 */ 27 33 public UnJoinNodeWayAction() { 28 34 super(tr("Disconnect Node from Way"), "unjoinnodeway", -
trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java
r6326 r6986 93 93 */ 94 94 public static class TagSwitcher { 95 96 private TagSwitcher() { 97 // Hide implicit public constructor for utility class 98 } 95 99 96 100 /** -
trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java
r6643 r6986 740 740 */ 741 741 public static class PreferencesUtils { 742 743 private PreferencesUtils() { 744 // Hide implicit public constructor for utility class 745 } 742 746 743 747 private static void replacePreferences(Preferences fragment, Preferences mainpref) { -
trunk/src/org/openstreetmap/josm/data/Preferences.java
r6950 r6986 576 576 * the corresponding value otherwise. The result is not null. 577 577 */ 578 synchronized publicString get(final String key) {578 public synchronized String get(final String key) { 579 579 String value = get(key, null); 580 580 return value == null ? "" : value; … … 589 589 * def otherwise 590 590 */ 591 synchronized publicString get(final String key, final String def) {591 public synchronized String get(final String key, final String def) { 592 592 return getSetting(key, new StringSetting(def), StringSetting.class).getValue(); 593 593 } 594 594 595 synchronized publicMap<String, String> getAllPrefix(final String prefix) {595 public synchronized Map<String, String> getAllPrefix(final String prefix) { 596 596 final Map<String,String> all = new TreeMap<String,String>(); 597 597 for (final Entry<String,Setting> e : settingsMap.entrySet()) { … … 603 603 } 604 604 605 synchronized publicList<String> getAllPrefixCollectionKeys(final String prefix) {605 public synchronized List<String> getAllPrefixCollectionKeys(final String prefix) { 606 606 final List<String> all = new LinkedList<String>(); 607 607 for (Map.Entry<String, Setting> entry : settingsMap.entrySet()) { … … 613 613 } 614 614 615 synchronized publicMap<String, String> getAllColors() {615 public synchronized Map<String, String> getAllColors() { 616 616 final Map<String,String> all = new TreeMap<String,String>(); 617 617 for (final Entry<String,Setting> e : defaultsMap.entrySet()) { … … 631 631 } 632 632 633 synchronized publicboolean getBoolean(final String key) {633 public synchronized boolean getBoolean(final String key) { 634 634 String s = get(key, null); 635 635 return s == null ? false : Boolean.parseBoolean(s); 636 636 } 637 637 638 synchronized publicboolean getBoolean(final String key, final boolean def) {638 public synchronized boolean getBoolean(final String key, final boolean def) { 639 639 return Boolean.parseBoolean(get(key, Boolean.toString(def))); 640 640 } 641 641 642 synchronized publicboolean getBoolean(final String key, final String specName, final boolean def) {642 public synchronized boolean getBoolean(final String key, final String specName, final boolean def) { 643 643 boolean generic = getBoolean(key, def); 644 644 String skey = key+"."+specName; … … 823 823 * @return a Color object for the configured colour, or the default value if none configured. 824 824 */ 825 synchronized publicColor getColor(String colName, Color def) {825 public synchronized Color getColor(String colName, Color def) { 826 826 return getColor(colName, null, def); 827 827 } 828 828 829 synchronized publicColor getUIColor(String colName) {829 public synchronized Color getUIColor(String colName) { 830 830 return UIManager.getColor(colName); 831 831 } 832 832 833 833 /* only for preferences */ 834 synchronized publicString getColorName(String o) {834 public synchronized String getColorName(String o) { 835 835 try { 836 836 Matcher m = Pattern.compile("mappaint\\.(.+?)\\.(.+)").matcher(o); … … 869 869 * @return a Color object for the configured colour, or the default value if none configured. 870 870 */ 871 synchronized publicColor getColor(String colName, String specName, Color def) {871 public synchronized Color getColor(String colName, String specName, Color def) { 872 872 String colKey = ColorProperty.getColorKey(colName); 873 873 if(!colKey.equals(colName)) { … … 885 885 } 886 886 887 synchronized publicColor getDefaultColor(String colKey) {887 public synchronized Color getDefaultColor(String colKey) { 888 888 StringSetting col = Utils.cast(defaultsMap.get("color."+colKey), StringSetting.class); 889 889 String colStr = col == null ? null : col.getValue(); … … 891 891 } 892 892 893 synchronized publicboolean putColor(String colKey, Color val) {893 public synchronized boolean putColor(String colKey, Color val) { 894 894 return put("color."+colKey, val != null ? ColorHelper.color2html(val, true) : null); 895 895 } 896 896 897 synchronized publicint getInteger(String key, int def) {897 public synchronized int getInteger(String key, int def) { 898 898 String v = get(key, Integer.toString(def)); 899 899 if(v.isEmpty()) … … 908 908 } 909 909 910 synchronized publicint getInteger(String key, String specName, int def) {910 public synchronized int getInteger(String key, String specName, int def) { 911 911 String v = get(key+"."+specName); 912 912 if(v.isEmpty()) … … 923 923 } 924 924 925 synchronized publiclong getLong(String key, long def) {925 public synchronized long getLong(String key, long def) { 926 926 String v = get(key, Long.toString(def)); 927 927 if(null == v) … … 936 936 } 937 937 938 synchronized publicdouble getDouble(String key, double def) {938 public synchronized double getDouble(String key, double def) { 939 939 String v = get(key, Double.toString(def)); 940 940 if(null == v) … … 971 971 } 972 972 973 synchronized publicvoid removeFromCollection(String key, String value) {973 public synchronized void removeFromCollection(String key, String value) { 974 974 List<String> a = new ArrayList<String>(getCollection(key, Collections.<String>emptyList())); 975 975 a.remove(value); … … 1017 1017 } 1018 1018 1019 synchronized publicSetting getSetting(String key, Setting def) {1019 public synchronized Setting getSetting(String key, Setting def) { 1020 1020 return getSetting(key, def, Setting.class); 1021 1021 } … … 1033 1033 */ 1034 1034 @SuppressWarnings("unchecked") 1035 synchronized public<T extends Setting> T getSetting(String key, T def, Class<T> klass) {1035 public synchronized <T extends Setting> T getSetting(String key, T def, Class<T> klass) { 1036 1036 CheckParameterUtil.ensureParameterNotNull(key); 1037 1037 CheckParameterUtil.ensureParameterNotNull(def); … … 1074 1074 */ 1075 1075 @SuppressWarnings({ "unchecked", "rawtypes" }) 1076 synchronized publicCollection<Collection<String>> getArray(String key, Collection<Collection<String>> def) {1076 public synchronized Collection<Collection<String>> getArray(String key, Collection<Collection<String>> def) { 1077 1077 ListListSetting val = getSetting(key, ListListSetting.create(def), ListListSetting.class); 1078 1078 return (Collection) val.getValue(); -
trunk/src/org/openstreetmap/josm/data/UndoRedoHandler.java
r6413 r6986 62 62 * @param c The command to execute. Must not be {@code null}. 63 63 */ 64 synchronized publicvoid add(final Command c) {64 public synchronized void add(final Command c) { 65 65 addNoRedraw(c); 66 66 afterAdd(); … … 78 78 * @param num The number of commands to undo 79 79 */ 80 synchronized publicvoid undo(int num) {80 public synchronized void undo(int num) { 81 81 if (commands.isEmpty()) 82 82 return; -
trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
r6897 r6986 87 87 */ 88 88 abstract static class PrimitiveToTag implements Utils.Function<OsmPrimitive, Tag> { 89 90 private PrimitiveToTag() { 91 // Hide implicit public constructor for utility class 92 } 89 93 90 94 /** -
trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java
r6623 r6986 54 54 // fake country/state to not get errors on holidays 55 55 ENGINE.eval("var nominatimJSON = {address: {state: 'Bayern', country_code: 'de'}};"); 56 ENGINE.eval( "" +56 ENGINE.eval( 57 57 "var oh = function (value, mode) {" + 58 58 " try {" + -
trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
r6889 r6986 174 174 175 175 if (n == null) { 176 n = node.isNew() ? tr("node") : ""+ node.getId();176 n = node.isNew() ? tr("node") : Long.toString(node.getId()); 177 177 } 178 178 name.append(n); -
trunk/src/org/openstreetmap/josm/gui/MenuScroller.java
r6920 r6986 566 566 UP(9, 1, 9), 567 567 DOWN(1, 9, 1); 568 final int[] xPoints = {1, 5, 9};568 static final int[] xPoints = {1, 5, 9}; 569 569 final int[] yPoints; 570 570 -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PresetListPanel.java
r6572 r6986 14 14 import java.util.Map; 15 15 16 import javax.swing.Action;17 import javax.swing.Icon;18 16 import javax.swing.JLabel; 19 17 import javax.swing.JPanel; … … 27 25 public class PresetListPanel extends JPanel { 28 26 27 /** 28 * Constructs a new {@code PresetListPanel}. 29 */ 29 30 public PresetListPanel() { 30 31 super(new GridBagLayout()); -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
r6890 r6986 81 81 * Class that helps PropertiesDialog add and edit tag values 82 82 */ 83 83 class TagEditHelper { 84 84 private final DefaultTableModel tagData; 85 85 private final Map<String, Map<String, Integer>> valueCount; … … 769 769 } 770 770 } 771 771 } -
trunk/src/org/openstreetmap/josm/gui/layer/JumpToMarkerActions.java
r6362 r6986 42 42 } 43 43 44 private static abstractclass JumpToMarker extends AbstractAction implements MultikeyShortcutAction {44 private abstract static class JumpToMarker extends AbstractAction implements MultikeyShortcutAction { 45 45 46 46 private final Layer layer; -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java
r6883 r6986 246 246 "exifCoor = "+exifCoor+" | "+ 247 247 (tmp == null ? " tmp==null" : 248 " [tmp] pos = "+tmp.pos +"");248 " [tmp] pos = "+tmp.pos); 249 249 return result; 250 250 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java
r6889 r6986 197 197 } else if (val instanceof Color) { 198 198 res.append(Utils.toString((Color)val)); 199 } else {200 res.append(val +"");199 } else if (val != null) { 200 res.append(val.toString()); 201 201 } 202 202 res.append("; "); -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java
r6970 r6986 79 79 REGEX, NREGEX, ONE_OF, BEGINS_WITH, ENDS_WITH, CONTAINS; 80 80 81 private static Set<Op> NEGATED_OPS = EnumSet.of(NEQ, NREGEX);81 private static final Set<Op> NEGATED_OPS = EnumSet.of(NEQ, NREGEX); 82 82 83 83 public boolean eval(String testString, String prototypeString) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/xml/Prototype.java
r6883 r6986 38 38 } 39 39 40 public boolean check(OsmPrimitive primitive) 41 { 40 public boolean check(OsmPrimitive primitive) { 42 41 if(conditions == null) 43 42 return true; 44 for(XmlCondition r : conditions) 45 { 43 for(XmlCondition r : conditions) { 46 44 String k = primitive.get(r.key); 47 45 … … 56 54 return true; 57 55 } 58 59 56 } -
trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java
r6830 r6986 836 836 * Base class for the nodes that model a MultiSplitLayout. 837 837 */ 838 public static abstractclass Node {838 public abstract static class Node { 839 839 private Split parent = null; 840 840 private Rectangle bounds = new Rectangle(); … … 1107 1107 sb.append(" \""); 1108 1108 sb.append(getName()); 1109 sb.append( "\"");1109 sb.append('\"'); 1110 1110 sb.append(" weight="); 1111 1111 sb.append(getWeight()); 1112 sb.append( " ");1112 sb.append(' '); 1113 1113 sb.append(getBounds()); 1114 1114 return sb.toString(); -
trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitPane.java
r6340 r6986 145 145 * @see #setDividerPainter 146 146 */ 147 public static abstractclass DividerPainter {147 public abstract static class DividerPainter { 148 148 /** 149 149 * Paint a single Divider. -
trunk/src/org/openstreetmap/josm/tools/template_engine/Condition.java
r4282 r6986 55 55 return sb.toString(); 56 56 } 57 58 57 } -
trunk/src/org/openstreetmap/josm/tools/template_engine/StaticText.java
r4282 r6986 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.tools.template_engine; 3 4 3 5 4 public class StaticText implements TemplateEntry { … … 25 24 return staticText; 26 25 } 27 28 29 26 } -
trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateEntry.java
r4282 r6986 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.tools.template_engine; 3 4 3 5 4 public interface TemplateEntry { -
trunk/src/org/openstreetmap/josm/tools/template_engine/Variable.java
r4431 r6986 3 3 4 4 import java.util.Collection; 5 6 5 7 6 public class Variable implements TemplateEntry { … … 62 61 return special; 63 62 } 64 65 63 }
Note:
See TracChangeset
for help on using the changeset viewer.