- Timestamp:
- 2016-01-05T10:06:59+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapStatus.java
r9272 r9317 761 761 private final JMenuItem jumpButton = add(Main.main.menu.jumpToAct); 762 762 763 /** Icons for selecting {@link SystemOfMeasurement} */ 763 764 private final Collection<JCheckBoxMenuItem> somItems = new ArrayList<>(); 765 /** Icons for selecting {@link CoordinateFormat} */ 766 private final Collection<JCheckBoxMenuItem> coordinateFormatItems = new ArrayList<>(); 764 767 765 768 private final JSeparator separator = new JSeparator(); … … 782 785 }); 783 786 somItems.add(item); 787 add(item); 788 } 789 for (final CoordinateFormat format : CoordinateFormat.values()) { 790 JCheckBoxMenuItem item = new JCheckBoxMenuItem(new AbstractAction(format.getDisplayName()) { 791 @Override 792 public void actionPerformed(ActionEvent e) { 793 CoordinateFormat.setCoordinateFormat(format); 794 } 795 }); 796 coordinateFormatItems.add(item); 784 797 add(item); 785 798 } … … 798 811 item.setVisible(distText.equals(invoker)); 799 812 } 800 separator.setVisible(distText.equals(invoker)); 813 final String currentCorrdinateFormat = CoordinateFormat.getDefaultFormat().getDisplayName(); 814 for (JMenuItem item : coordinateFormatItems) { 815 item.setSelected(currentCorrdinateFormat.equals(item.getText())); 816 item.setVisible(latText.equals(invoker) || lonText.equals(invoker)); 817 } 818 separator.setVisible(distText.equals(invoker) || latText.equals(invoker) || lonText.equals(invoker)); 801 819 doNotHide.setSelected(Main.pref.getBoolean("statusbar.always-visible", true)); 802 820 }
Note:
See TracChangeset
for help on using the changeset viewer.