Changeset 10053 in josm
- Timestamp:
- 2016-03-26T22:47:13+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java
r9982 r10053 13 13 import javax.swing.JLabel; 14 14 import javax.swing.JPanel; 15 import javax.swing.UIManager; 15 16 16 17 import org.openstreetmap.gui.jmapviewer.JMapViewer; … … 22 23 import org.openstreetmap.josm.gui.NavigatableComponent; 23 24 import org.openstreetmap.josm.gui.util.GuiHelper; 25 import org.openstreetmap.josm.gui.widgets.JosmTextArea; 24 26 import org.openstreetmap.josm.tools.CheckParameterUtil; 25 27 import org.openstreetmap.josm.tools.Pair; … … 189 191 } 190 192 193 private static JosmTextArea newTextArea() { 194 JosmTextArea area = new JosmTextArea(); 195 GuiHelper.setBackgroundReadable(area, Color.WHITE); 196 area.setEditable(false); 197 area.setOpaque(true); 198 area.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); 199 area.setFont(UIManager.getFont("Label.font")); 200 return area; 201 } 202 191 203 private static class Updater { 192 204 private final HistoryBrowserModel model; … … 220 232 return Pair.create(node.getCoords(), oppositeNode.getCoords()); 221 233 } 222 223 234 } 224 235 225 236 /** 226 * A UI widgets which displays the Lan/Lon-coordinates of a 227 * {@link HistoryNode}. 228 * 237 * A UI widgets which displays the Lan/Lon-coordinates of a {@link HistoryNode}. 229 238 */ 230 239 private static class LatLonViewer extends JPanel implements Observer { 231 240 232 private JLabel lblLat;233 private JLabel lblLon;241 private final JosmTextArea lblLat = newTextArea(); 242 private final JosmTextArea lblLon = newTextArea(); 234 243 private final Updater updater; 235 244 private final Color modifiedColor; … … 254 263 gc.fill = GridBagConstraints.HORIZONTAL; 255 264 gc.weightx = 1.0; 256 add(lblLat = new JLabel(), gc); 257 GuiHelper.setBackgroundReadable(lblLat, Color.WHITE); 258 lblLat.setOpaque(true); 259 lblLat.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); 265 add(lblLat, gc); 260 266 261 267 // -------- … … 272 278 gc.fill = GridBagConstraints.HORIZONTAL; 273 279 gc.weightx = 1.0; 274 add(lblLon = new JLabel(), gc); 275 GuiHelper.setBackgroundReadable(lblLon, Color.WHITE); 276 lblLon.setOpaque(true); 277 lblLon.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); 280 add(lblLon, gc); 278 281 } 279 282 280 283 /** 281 * 284 * Constrcuts a new {@code LatLonViewer}. 282 285 * @param model a model 283 286 * @param role the role for this viewer. … … 357 360 private static class DistanceViewer extends JPanel implements Observer { 358 361 359 private JLabel lblDistance;362 private final JosmTextArea lblDistance = newTextArea(); 360 363 private final Updater updater; 361 364 … … 384 387 gc.fill = GridBagConstraints.HORIZONTAL; 385 388 gc.weightx = 1.0; 386 add(lblDistance = new JLabel(), gc); 387 GuiHelper.setBackgroundReadable(lblDistance, Color.WHITE); 388 lblDistance.setOpaque(true); 389 lblDistance.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); 389 add(lblDistance, gc); 390 390 } 391 391
Note:
See TracChangeset
for help on using the changeset viewer.