Changeset 31809 in osm for applications
- Timestamp:
- 2015-12-10T22:12:06+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSetting.java
r31808 r31809 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.plugins.mapillary.gui; 3 4 import static org.openstreetmap.josm.tools.I18n.tr;5 3 6 4 import java.awt.FlowLayout; … … 44 42 public class MapillaryPreferenceSetting implements SubPreferenceSetting, MapillaryLoginListener { 45 43 46 private JCheckBox reverseButtons = new JCheckBox( 47 tr("Reverse buttons position when displaying images.")); 44 private JCheckBox reverseButtons = new JCheckBox(I18n.tr("Reverse buttons position when displaying images.")); 48 45 private JComboBox<String> downloadMode = new JComboBox<>(new String[]{ 49 46 MapillaryDownloader.MODES.Automatic.toString(), … … 51 48 MapillaryDownloader.MODES.Manual.toString() 52 49 }); 53 private JCheckBox displayHour = new JCheckBox( 54 tr("Display hour when the picture was taken")); 55 private JCheckBox format24 = new JCheckBox(tr("Use 24 hour format")); 56 private JCheckBox moveTo = new JCheckBox( 57 tr("Move to picture''s location with next/previous buttons")); 58 private JButton login; 50 private JCheckBox displayHour = new JCheckBox(I18n.tr("Display hour when the picture was taken")); 51 private JCheckBox format24 = new JCheckBox(I18n.tr("Use 24 hour format")); 52 private JCheckBox moveTo = new JCheckBox(I18n.tr("Move to picture''s location with next/previous buttons")); 59 53 60 54 private JButton loginButton = new JButton(new LoginAction(this)); … … 71 65 public void addGui(PreferenceTabbedPane gui) { 72 66 JPanel panel = new JPanel(); 73 this.reverseButtons.setSelected(Main.pref 74 .getBoolean("mapillary.reverse-buttons")); 75 this.displayHour.setSelected(Main.pref.getBoolean("mapillary.display-hour", 76 true)); 67 this.reverseButtons.setSelected(Main.pref.getBoolean("mapillary.reverse-buttons")); 68 this.displayHour.setSelected(Main.pref.getBoolean("mapillary.display-hour", true)); 77 69 this.format24.setSelected(Main.pref.getBoolean("mapillary.format-24")); 78 this.moveTo.setSelected(Main.pref.getBoolean("mapillary.move-to-picture", 79 true)); 80 panel.setLayout(new FlowLayout(FlowLayout.LEFT)); 81 panel.add(this.reverseButtons); 70 this.moveTo.setSelected(Main.pref.getBoolean("mapillary.move-to-picture", true)); 71 72 panel.setLayout(new GridBagLayout()); 73 panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); 74 75 panel.add(this.reverseButtons, GBC.eol()); 82 76 // Sets the value of the ComboBox. 83 77 if (Main.pref.get("mapillary.download-mode").equals(MapillaryDownloader.MODES.Automatic.toString()) … … 87 81 } 88 82 JPanel downloadModePanel = new JPanel(); 89 downloadModePanel.add(new JLabel( tr("Download mode:")));83 downloadModePanel.add(new JLabel(I18n.tr("Download mode"))); 90 84 downloadModePanel.add(this.downloadMode); 91 panel.add(downloadModePanel );92 panel.add( this.displayHour);93 panel.add( this.format24);94 panel.add( this.moveTo);85 panel.add(downloadModePanel, GBC.eol()); 86 panel.add(displayHour, GBC.eol()); 87 panel.add(format24, GBC.eol()); 88 panel.add(moveTo, GBC.eol()); 95 89 96 90 loginPanel.setLayout(new FlowLayout(FlowLayout.LEADING)); … … 101 95 panel.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.BOTH)); 102 96 103 gui.getDisplayPreference().addSubTab(this, "Mapillary", panel);97 gui.getDisplayPreference().addSubTab(this, "Mapillary", new JScrollPane(panel)); 104 98 105 99 new Thread(new Runnable() { … … 144 138 public boolean ok() { 145 139 boolean mod = false; 146 Main.pref 147 .put("mapillary.reverse-buttons", this.reverseButtons.isSelected()); 140 Main.pref.put("mapillary.reverse-buttons", this.reverseButtons.isSelected()); 148 141 149 142 MapillaryPlugin.setMenuEnabled(MapillaryPlugin.getDownloadViewMenu(), false);
Note:
See TracChangeset
for help on using the changeset viewer.