Changeset 31296 in osm for applications/editors/josm/plugins/mapillary
- Timestamp:
- 2015-06-22T13:13:47+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryAbstractImage.java
r31284 r31296 141 141 */ 142 142 public String getDate() { 143 return getDate("dd/MM/yyyy - hh:mm:ss"); 143 String format = ""; 144 if (Main.pref.getBoolean("iso.dates")) 145 format += "yyyy-MM-dd"; 146 else 147 format += "dd/MM/yyyy"; 148 if (Main.pref.getBoolean("mapillary.display-hour")){ 149 if (Main.pref.getBoolean("mapillary.format-24")) 150 format += " - HH:mm:ss"; 151 else 152 format += " - h:mm:ss a"; 153 } 154 return getDate(format); 144 155 } 145 156 -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryDownloader.java
r31278 r31296 48 48 url2 += buildParameters(hash); 49 49 url3 += buildParameters(hash); 50 System.out.println(url2);51 50 52 51 try { -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryFilterDialog.java
r31284 r31296 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 4 5 import java.awt.Dimension; 5 6 import java.awt.FlowLayout; 6 7 import java.awt.GridLayout; … … 14 15 import javax.swing.JCheckBox; 15 16 import javax.swing.JComboBox; 17 import javax.swing.JDialog; 16 18 import javax.swing.JLabel; 19 import javax.swing.JOptionPane; 17 20 import javax.swing.JPanel; 18 21 import javax.swing.JTextField; 19 22 23 import org.openstreetmap.josm.Main; 20 24 import org.openstreetmap.josm.gui.SideButton; 21 25 import org.openstreetmap.josm.gui.dialogs.ToggleDialog; … … 66 70 imported = new JCheckBox("Imported images"); 67 71 downloaded = new JCheckBox(new downloadCheckBoxAction()); 68 onlySigns = new JCheckBox( "Only images with signs");72 onlySigns = new JCheckBox(new OnlySignsAction()); 69 73 70 74 signChooser = new JButton(new SignChooserAction()); … … 221 225 } 222 226 } 227 228 private class OnlySignsAction extends AbstractAction { 229 public OnlySignsAction() { 230 putValue(NAME, tr("Only images with signs")); 231 } 232 233 @Override 234 public void actionPerformed(ActionEvent arg0) { 235 signChooser.setEnabled(onlySigns.isSelected()); 236 } 237 } 223 238 224 239 private class SignChooserAction extends AbstractAction { … … 229 244 @Override 230 245 public void actionPerformed(ActionEvent arg0) { 246 JPanel dialog = MapillaryFilterChooseSigns.getInstance(); 247 JOptionPane pane = new JOptionPane(dialog, JOptionPane.PLAIN_MESSAGE, 248 JOptionPane.OK_CANCEL_OPTION); 249 JDialog dlg = pane.createDialog(Main.parent, tr("Choose signs")); 250 dlg.setMinimumSize(new Dimension(400, 150)); 251 dlg.setVisible(true); 231 252 MapillaryFilterDialog.getInstance().refresh(); 253 dlg.dispose(); 254 232 255 } 233 256 } -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSetting.java
r31278 r31296 2 2 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 4 5 import java.awt.FlowLayout; 5 6 … … 18 19 private JCheckBox downloadMode = new JCheckBox( 19 20 tr("Download images manually")); 21 private JCheckBox displayHour = new JCheckBox(tr("Display hour when the picture was taken")); 22 private JCheckBox format24 = new JCheckBox(tr("Use 24 hour format")); 20 23 21 24 @Override … … 32 35 downloadMode.setSelected(Main.pref 33 36 .getBoolean("mapillary.download-manually")); 37 displayHour.setSelected(Main.pref.getBoolean("mapillary.display-hour", true)); 38 format24.setSelected(Main.pref.getBoolean("mapillary.format-24")); 34 39 35 40 panel.setLayout(new FlowLayout(FlowLayout.LEFT)); 36 41 panel.add(reverseButtons); 37 42 panel.add(downloadMode); 43 panel.add(displayHour); 44 panel.add(format24); 38 45 gui.getDisplayPreference().addSubTab(this, "Mapillary", panel); 39 46 } … … 44 51 Main.pref.put("mapillary.reverse-buttons", reverseButtons.isSelected()); 45 52 Main.pref.put("mapillary.download-manually", downloadMode.isSelected()); 53 Main.pref.put("mapillary.display-hour", displayHour.isSelected()); 54 Main.pref.put("mapillary.format-24", format24.isSelected()); 46 55 return mod; 47 56 }
Note:
See TracChangeset
for help on using the changeset viewer.