Changeset 10179 in josm for trunk/src/org/openstreetmap/josm/gui/history
- Timestamp:
- 2016-05-11T02:44:10+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/history
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java
r10055 r10179 83 83 gc.fill = GridBagConstraints.HORIZONTAL; 84 84 gc.anchor = GridBagConstraints.NORTHWEST; 85 add(referenceLatLonViewer = new LatLonViewer(model, PointInTimeType.REFERENCE_POINT_IN_TIME), gc); 85 referenceLatLonViewer = new LatLonViewer(model, PointInTimeType.REFERENCE_POINT_IN_TIME); 86 add(referenceLatLonViewer, gc); 86 87 87 88 gc.gridx = 1; … … 91 92 gc.fill = GridBagConstraints.HORIZONTAL; 92 93 gc.anchor = GridBagConstraints.NORTHWEST; 93 add(currentLatLonViewer = new LatLonViewer(model, PointInTimeType.CURRENT_POINT_IN_TIME), gc); 94 currentLatLonViewer = new LatLonViewer(model, PointInTimeType.CURRENT_POINT_IN_TIME); 95 add(currentLatLonViewer, gc); 94 96 95 97 // -------------------- … … 101 103 gc.weightx = 1.0; 102 104 gc.weighty = 0.0; 103 add(distanceViewer = new DistanceViewer(model), gc); 105 distanceViewer = new DistanceViewer(model); 106 add(distanceViewer, gc); 104 107 105 108 // the map panel … … 110 113 gc.weightx = 1.0; 111 114 gc.weighty = 1.0; 112 add(mapViewer = new MapViewer(model), gc); 115 mapViewer = new MapViewer(model); 116 add(mapViewer, gc); 113 117 mapViewer.setZoomContolsVisible(false); 114 118 } -
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowser.java
r9543 r10179 34 34 35 35 /** 36 * Constructs a new {@code HistoryBrowser}. 37 */ 38 public HistoryBrowser() { 39 model = new HistoryBrowserModel(); 40 build(); 41 } 42 43 /** 44 * Constructs a new {@code HistoryBrowser}. 45 * @param history the history of an {@link OsmPrimitive} 46 */ 47 public HistoryBrowser(History history) { 48 this(); 49 populate(history); 50 } 51 52 /** 36 53 * creates the table which shows the list of versions 37 54 * … … 40 57 protected JPanel createVersionTablePanel() { 41 58 JPanel pnl = new JPanel(new BorderLayout()); 42 43 VersionTable versionTable = new VersionTable(model); 44 pnl.add(new JScrollPane(versionTable), BorderLayout.CENTER); 59 pnl.add(new JScrollPane(new VersionTable(model)), BorderLayout.CENTER); 45 60 return pnl; 46 61 } … … 82 97 */ 83 98 protected void build() { 84 JPanel left ;85 JPanel right ;99 JPanel left = createVersionTablePanel(); 100 JPanel right = createVersionComparePanel(); 86 101 setLayout(new BorderLayout()); 87 JSplitPane pane = new JSplitPane( 88 JSplitPane.HORIZONTAL_SPLIT, 89 left = createVersionTablePanel(), 90 right = createVersionComparePanel() 91 ); 102 JSplitPane pane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, left, right); 92 103 add(pane, BorderLayout.CENTER); 93 104 … … 100 111 } 101 112 102 /**103 * constructor104 */105 public HistoryBrowser() {106 model = new HistoryBrowserModel();107 build();108 }109 110 /**111 * constructor112 * @param history the history of an {@link OsmPrimitive}113 */114 public HistoryBrowser(History history) {115 this();116 populate(history);117 }118 113 119 114 /**
Note:
See TracChangeset
for help on using the changeset viewer.