- Timestamp:
- 2013-09-08T05:51:16+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/corrector/CorrectionTable.java
r6084 r6223 10 10 import javax.swing.table.TableCellRenderer; 11 11 12 public abstract class CorrectionTable<T Mextends CorrectionTableModel<?>>12 public abstract class CorrectionTable<T extends CorrectionTableModel<?>> 13 13 extends JTable { 14 14 … … 34 34 private static BoldRenderer boldRenderer = null; 35 35 36 protected CorrectionTable(T McorrectionTableModel) {36 protected CorrectionTable(T correctionTableModel) { 37 37 super(correctionTableModel); 38 38 … … 58 58 59 59 @SuppressWarnings("unchecked") 60 public T MgetCorrectionTableModel() {61 return (T M)getModel();60 public T getCorrectionTableModel() { 61 return (T)getModel(); 62 62 } 63 63 -
trunk/src/org/openstreetmap/josm/data/osm/User.java
r5818 r6223 39 39 * 40 40 * @param name the name 41 * @return a new local user with the given name 41 42 */ 42 43 public static User createLocalUser(String name) { … … 57 58 * @param uid the user id 58 59 * @param name the name 60 * @return a new OSM user with the given name and uid 59 61 */ 60 62 public static User createOsmUser(long uid, String name) { … … 107 109 } 108 110 111 /** 112 * Replies the anonymous user 113 * @return The anonymous user 114 */ 109 115 public static User getAnonymous() { 110 116 return anonymous; … … 175 181 } 176 182 183 /** 184 * Determines if this user is known to OSM 185 * @return {@code true} if this user is known to OSM, {@code false} otherwise 186 */ 177 187 public boolean isOsmUser() { 178 188 return uid > 0; 179 189 } 180 190 191 /** 192 * Determines if this user is local 193 * @return {@code true} if this user is local, {@code false} otherwise 194 */ 181 195 public boolean isLocalUser() { 182 196 return uid < 0; … … 205 219 public String toString() { 206 220 StringBuffer s = new StringBuffer(); 207 s.append("id:" +uid);221 s.append("id:").append(uid); 208 222 if (names.size() == 1) { 209 s.append(" name:" +getName());223 s.append(" name:").append(getName()); 210 224 } 211 225 else if (names.size() > 1) { -
trunk/src/org/openstreetmap/josm/gui/help/HelpBrowserHistory.java
r5923 r6223 52 52 boolean add=true; 53 53 54 if (historyPos >= 0 && historyPos < history.size() && history.get(historyPos).equals(url .toString())) {54 if (historyPos >= 0 && historyPos < history.size() && history.get(historyPos).equals(url)) { 55 55 add = false; 56 56 } else if (historyPos == history.size() -1) { -
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java
r6084 r6223 188 188 @Override 189 189 public boolean evaluate(OsmPrimitive p) { 190 if (hds.getHistory(p.getPrimitiveId()) == null) 190 History h = hds.getHistory(p.getPrimitiveId()); 191 if (h == null) 191 192 // reload if the history is not in the cache yet 192 193 return true; 193 else if (!p.isNew() && h ds.getHistory(p.getPrimitiveId()).getByVersion(p.getUniqueId()) == null)194 else if (!p.isNew() && h.getByVersion(p.getUniqueId()) == null) 194 195 // reload if the history object of the selected object is not in the cache yet 195 196 return true; -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r6106 r6223 33 33 import java.util.Comparator; 34 34 import java.util.Date; 35 import java.util.Dictionary; 35 36 import java.util.Hashtable; 36 37 import java.util.List; … … 73 74 import org.openstreetmap.josm.gui.layer.Layer; 74 75 import org.openstreetmap.josm.gui.widgets.JosmComboBox; 76 import org.openstreetmap.josm.gui.widgets.JosmTextField; 75 77 import org.openstreetmap.josm.io.GpxReader; 76 78 import org.openstreetmap.josm.tools.ExifReader; … … 79 81 import org.openstreetmap.josm.tools.PrimaryDateParser; 80 82 import org.xml.sax.SAXException; 81 import org.openstreetmap.josm.gui.widgets.JosmTextField;82 83 83 84 /** This class displays the window to select the GPX file and the offset (timezone + delta). … … 881 882 final JSlider sldTimezone = new JSlider(-24, 24, 0); 882 883 sldTimezone.setPaintLabels(true); 883 Hashtable<Integer,JLabel> labelTable = new Hashtable<Integer, JLabel>();884 Dictionary<Integer,JLabel> labelTable = new Hashtable<Integer, JLabel>(); 884 885 labelTable.put(-24, new JLabel("-12:00")); 885 886 labelTable.put(-12, new JLabel( "-6:00")); -
trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java
r6084 r6223 201 201 @Override 202 202 public boolean identify(TabPreferenceSetting tps, Object name) { 203 return name != null && tps != null && tps.getIconName() != null && tps.getIconName().equals(name);203 return name != null && tps != null && tps.getIconName() != null && name.equals(tps.getIconName()); 204 204 }}, name); 205 205 } -
trunk/src/org/openstreetmap/josm/io/OsmServerObjectReader.java
r6070 r6223 129 129 sb.append("/full"); 130 130 } else if (version > 0) { 131 sb.append("/" +version);131 sb.append("/").append(version); 132 132 } 133 133 -
trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java
r6143 r6223 19 19 import java.util.StringTokenizer; 20 20 import java.util.TreeMap; 21 import java.util.logging.Level;22 import java.util.logging.Logger;23 21 import java.util.regex.Matcher; 24 22 import java.util.regex.Pattern; 25 23 26 import org.openstreetmap.josm.Main;27 24 import org.openstreetmap.josm.gui.help.HelpUtil; 28 25 import org.openstreetmap.josm.io.remotecontrol.handler.AddNodeHandler; … … 78 75 /** 79 76 * Spawns a new thread for the request 77 * @param request The request to process 80 78 */ 81 79 public static void processRequest(Socket request) { … … 214 212 String usage = getUsageAsHtml(); 215 213 String websiteDoc = HelpUtil.getWikiBaseHelpUrl() +"/Help/Preferences/RemoteControl"; 216 String help = "No command specified! The following commands are available:<ul>" 217 + usage.toString() 214 String help = "No command specified! The following commands are available:<ul>" + usage 218 215 + "</ul>" + "See <a href=\""+websiteDoc+"\">"+websiteDoc+"</a> for complete documentation."; 219 216 sendBadRequest(out, help); … … 449 446 /** 450 447 * Reports HTML message with the description of all available commands 451 * @return 448 * @return HTML message with the description of all available commands 452 449 * @throws IllegalAccessException 453 450 * @throws InstantiationException -
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.