Ignore:
Timestamp:
2015-06-22T13:13:47+02:00 (9 years ago)
Author:
nokutu
Message:

Improved picture's capture time visualization and start with choose signals GUI

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  
    141141     */
    142142    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);
    144155    }
    145156
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryDownloader.java

    r31278 r31296  
    4848        url2 += buildParameters(hash);
    4949        url3 += buildParameters(hash);
    50         System.out.println(url2);
    5150
    5251        try {
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryFilterDialog.java

    r31284 r31296  
    33import static org.openstreetmap.josm.tools.I18n.tr;
    44
     5import java.awt.Dimension;
    56import java.awt.FlowLayout;
    67import java.awt.GridLayout;
     
    1415import javax.swing.JCheckBox;
    1516import javax.swing.JComboBox;
     17import javax.swing.JDialog;
    1618import javax.swing.JLabel;
     19import javax.swing.JOptionPane;
    1720import javax.swing.JPanel;
    1821import javax.swing.JTextField;
    1922
     23import org.openstreetmap.josm.Main;
    2024import org.openstreetmap.josm.gui.SideButton;
    2125import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
     
    6670        imported = new JCheckBox("Imported images");
    6771        downloaded = new JCheckBox(new downloadCheckBoxAction());
    68         onlySigns = new JCheckBox("Only images with signs");
     72        onlySigns = new JCheckBox(new OnlySignsAction());
    6973
    7074        signChooser = new JButton(new SignChooserAction());
     
    221225        }
    222226    }
     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    }
    223238
    224239    private class SignChooserAction extends AbstractAction {
     
    229244        @Override
    230245        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);
    231252            MapillaryFilterDialog.getInstance().refresh();
     253            dlg.dispose();
     254
    232255        }
    233256    }
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSetting.java

    r31278 r31296  
    22
    33import static org.openstreetmap.josm.tools.I18n.tr;
     4
    45import java.awt.FlowLayout;
    56
     
    1819    private JCheckBox downloadMode = new JCheckBox(
    1920            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"));
    2023
    2124    @Override
     
    3235        downloadMode.setSelected(Main.pref
    3336                .getBoolean("mapillary.download-manually"));
     37        displayHour.setSelected(Main.pref.getBoolean("mapillary.display-hour", true));
     38        format24.setSelected(Main.pref.getBoolean("mapillary.format-24"));
    3439
    3540        panel.setLayout(new FlowLayout(FlowLayout.LEFT));
    3641        panel.add(reverseButtons);
    3742        panel.add(downloadMode);
     43        panel.add(displayHour);
     44        panel.add(format24);
    3845        gui.getDisplayPreference().addSubTab(this, "Mapillary", panel);
    3946    }
     
    4451        Main.pref.put("mapillary.reverse-buttons", reverseButtons.isSelected());
    4552        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());
    4655        return mod;
    4756    }
Note: See TracChangeset for help on using the changeset viewer.