Changeset 5440 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2012-08-13T02:37:03+02:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/history
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowser.java
r5266 r5440 13 13 import javax.swing.JTable; 14 14 15 import org.openstreetmap.josm.data.osm.OsmPrimitive; 15 16 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 16 17 import org.openstreetmap.josm.data.osm.history.History; -
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
r5340 r5440 20 20 import org.openstreetmap.josm.data.osm.RelationMemberData; 21 21 import org.openstreetmap.josm.data.osm.User; 22 import org.openstreetmap.josm.data.osm.UserInfo; 22 23 import org.openstreetmap.josm.data.osm.Way; 23 24 import org.openstreetmap.josm.data.osm.event.AbstractDatasetChangedEvent; … … 36 37 import org.openstreetmap.josm.data.osm.history.HistoryWay; 37 38 import org.openstreetmap.josm.data.osm.visitor.AbstractVisitor; 39 import org.openstreetmap.josm.gui.JosmUserIdentityManager; 38 40 import org.openstreetmap.josm.gui.MapView; 39 41 import org.openstreetmap.josm.gui.MapView.LayerChangeListener; … … 437 439 case 4: { 438 440 HistoryOsmPrimitive p = getPrimitive(row); 439 if (p != null )441 if (p != null && p.getTimestamp() != null) 440 442 return DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT).format(p.getTimestamp()); 441 443 return null; … … 877 879 878 880 public void visit(Node n) { 879 clone = new HistoryNode(n.getId(), n.getVersion(), n.isVisible(), n.getUser(), 0, n.getTimestamp(), n.getCoor());881 clone = new HistoryNode(n.getId(), n.getVersion(), n.isVisible(), getCurrentUser(), 0, null, n.getCoor(), false); 880 882 clone.setTags(n.getKeys()); 881 883 } 882 884 883 885 public void visit(Relation r) { 884 clone = new HistoryRelation(r.getId(), r.getVersion(), r.isVisible(), r.getUser(), 0, r.getTimestamp());886 clone = new HistoryRelation(r.getId(), r.getVersion(), r.isVisible(), getCurrentUser(), 0, null, false); 885 887 clone.setTags(r.getKeys()); 886 888 HistoryRelation hr = (HistoryRelation)clone; … … 891 893 892 894 public void visit(Way w) { 893 clone = new HistoryWay(w.getId(), w.getVersion(), w.isVisible(), w.getUser(), 0, w.getTimestamp());895 clone = new HistoryWay(w.getId(), w.getVersion(), w.isVisible(), getCurrentUser(), 0, null, false); 894 896 clone.setTags(w.getKeys()); 895 897 for (Node n: w.getNodes()) { … … 898 900 } 899 901 902 private User getCurrentUser() { 903 UserInfo info = JosmUserIdentityManager.getInstance().getUserInfo(); 904 return info == null ? User.getAnonymous() : User.createOsmUser(info.getId(), info.getDisplayName()); 905 } 906 900 907 public HistoryOsmPrimitive build(OsmPrimitive primitive) { 901 908 primitive.visit(this); -
trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java
r5319 r5440 20 20 import org.openstreetmap.josm.Main; 21 21 import org.openstreetmap.josm.actions.AbstractInfoAction; 22 import org.openstreetmap.josm.data.osm.OsmPrimitive; 22 23 import org.openstreetmap.josm.data.osm.User; 23 24 import org.openstreetmap.josm.data.osm.history.HistoryOsmPrimitive; 24 25 import org.openstreetmap.josm.gui.JMultilineLabel; 26 import org.openstreetmap.josm.gui.JosmUserIdentityManager; 25 27 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 26 import org.openstreetmap.josm.io.auth.CredentialsManager;27 28 import org.openstreetmap.josm.tools.CheckParameterUtil; 28 29 import org.openstreetmap.josm.tools.UrlLabel; … … 153 154 lblUser.setDescription(username); 154 155 } else { 155 String user = CredentialsManager.getInstance().getUsername();156 String user = JosmUserIdentityManager.getInstance().getUserName(); 156 157 if (user == null) { 157 158 lblUser.setDescription(tr("anonymous")); 159 lblUser.setUrl(null); 158 160 } else { 159 161 try { -
trunk/src/org/openstreetmap/josm/gui/history/VersionTableColumnModel.java
r5340 r5440 7 7 import javax.swing.table.DefaultTableColumnModel; 8 8 import javax.swing.table.TableColumn; 9 import javax.swing.table.TableColumnModel; 9 10 10 11 /** … … 58 59 } 59 60 61 /** 62 * Creates a new {@code VersionTableColumnModel}. 63 */ 60 64 public VersionTableColumnModel() { 61 65 createColumns();
Note:
See TracChangeset
for help on using the changeset viewer.