Changeset 6223 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2013-09-08T05:51:16+02:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 3 edited
-
LanguageInfo.java (modified) (1 diff)
-
MultikeyActionsHandler.java (modified) (4 diffs)
-
Property.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java
r6142 r6223 38 38 if(code.matches("[^_]+_[^_]+")) { 39 39 code = code.substring(0,2); 40 if (code == "en")40 if ("en".equals(code)) 41 41 return null; 42 42 } else { 43 43 return null; 44 44 } 45 } else if(type == LocaleType.DEFAULTNOTENGLISH && code == "en")45 } else if(type == LocaleType.DEFAULTNOTENGLISH && "en".equals(code)) 46 46 return null; 47 47 return code.substring(0,1).toUpperCase() + code.substring(1) + ":"; -
trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java
r5463 r6223 30 30 31 31 private static final long DIALOG_DELAY = 1000; 32 private static final String STATUS_BAR_ID = new String("multikeyShortcut");32 private static final String STATUS_BAR_ID = "multikeyShortcut"; 33 33 34 34 private Map<MultikeyShortcutAction, MyAction> myActions = new HashMap<MultikeyShortcutAction,MyAction>(); … … 120 120 private static MultikeyActionsHandler instance; 121 121 122 /** 123 * Replies the unique instance of this class. 124 * @return The unique instance of this class 125 */ 122 126 public static MultikeyActionsHandler getInstance() { 123 127 if (instance == null) { … … 203 207 } 204 208 209 /** 210 * Registers an action and its shortcut 211 * @param action The action to add 212 */ 205 213 public void addAction(MultikeyShortcutAction action) { 206 if(action.getMultikeyShortcut() != null) { 214 if (action.getMultikeyShortcut() != null) { 207 215 MyAction myAction = new MyAction(action); 208 216 myActions.put(action, myAction); … … 211 219 } 212 220 213 // unregister action and its shortcut completely 221 /** 222 * Unregisters an action and its shortcut completely 223 * @param action The action to remove 224 */ 214 225 public void removeAction(MultikeyShortcutAction action) { 215 226 MyAction a = myActions.get(action); -
trunk/src/org/openstreetmap/josm/tools/Property.java
r3300 r6223 4 4 /** 5 5 * Small interface to define a property with both read and write access. 6 * @param <O> Object type 7 * @param <P> Property type 6 8 */ 7 public interface Property<ObjectType, PropertyType> { 9 public interface Property<O, P> { 10 8 11 /** 9 12 * Get the value of the property. … … 11 14 * @return the value of the property for the object obj 12 15 */ 13 public PropertyType get(ObjectType obj); 16 public P get(O obj); 17 14 18 /** 15 19 * Set the value of the property for the object. … … 17 21 * @param value the value the property is set to 18 22 */ 19 public void set(O bjectType obj, PropertyTypevalue);23 public void set(O obj, P value); 20 24 }
Note:
See TracChangeset
for help on using the changeset viewer.
