Changeset 36117 in osm for applications/editors/josm/plugins/livegps/src/livegps/LiveGpsDialog.java
- Timestamp:
- 2023-08-15T15:55:08+02:00 (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/livegps/src/livegps/LiveGpsDialog.java
r36111 r36117 16 16 import org.openstreetmap.josm.data.coor.conversion.CoordinateFormatManager; 17 17 import org.openstreetmap.josm.data.coor.conversion.ICoordinateFormat; 18 import org.openstreetmap.josm.data.coor.conversion.ProjectedCoordinateFormat; 18 19 import org.openstreetmap.josm.gui.MapFrame; 19 20 import org.openstreetmap.josm.gui.dialogs.ToggleDialog; … … 34 35 private JLabel nmeaStatusLabel; 35 36 private JLabel wayLabel; 37 private JLabel latText; 36 38 private JLabel latLabel; 39 private JLabel longText; 37 40 private JLabel longLabel; 38 41 private JLabel courseLabel; … … 55 58 panel.add(new JLabel(tr("Way Info"))); 56 59 panel.add(wayLabel = new JLabel()); 57 panel.add(new JLabel(tr("Latitude"))); 60 panel.add(latText = new JLabel(tr("Latitude"))); 58 61 panel.add(latLabel = new JLabel()); 59 panel.add(new JLabel(tr("Longitude"))); 62 panel.add(longText = new JLabel(tr("Longitude"))); 60 63 panel.add(longLabel = new JLabel()); 61 64 panel.add(new JLabel(tr("Speed"))); … … 72 75 */ 73 76 private void setStatusVisibility(boolean init) { 74 boolean statusGPSDNew = !Config.getPref().getBoolean(LiveG psAcquirer.C_DISABLED);77 boolean statusGPSDNew = !Config.getPref().getBoolean(LiveGPSPreferences.C_DISABLED); 75 78 if (init || statusGPSD != statusGPSDNew) { 76 79 statusText.setVisible(statusGPSDNew); … … 78 81 statusGPSD = statusGPSDNew; 79 82 } 80 boolean statusNMEANew = !Config.getPref().get(LiveG psAcquirerNMEA.C_SERIAL).isEmpty();83 boolean statusNMEANew = !Config.getPref().get(LiveGPSPreferences.C_SERIAL).isEmpty(); 81 84 if (init || statusNMEA != statusNMEANew) { 82 85 nmeaStatusText.setVisible(statusNMEANew); … … 100 103 panel.setBackground(Color.WHITE); 101 104 ICoordinateFormat mCord = CoordinateFormatManager.getDefaultFormat(); 105 if (ProjectedCoordinateFormat.INSTANCE.equals(mCord)) { 106 latText.setText(tr("Northing")); 107 longText.setText(tr("Easting")); 108 } else { 109 latText.setText(tr("Latitude")); 110 longText.setText(tr("Longitude")); 111 } 102 112 latLabel.setText(mCord.latToString(data.getLatLon())); 103 113 longLabel.setText(mCord.lonToString(data.getLatLon()));
Note:
See TracChangeset
for help on using the changeset viewer.