Changeset 16788 in osm for applications/editors


Ignore:
Timestamp:
2009-08-03T11:38:28+02:00 (15 years ago)
Author:
guggis
Message:

Updated to JOSM release 1893

Location:
applications/editors/josm/plugins/validator
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/validator/build.xml

    r16629 r16788  
    2626                <attribute name="Plugin-Description" value="An OSM data validator. It checks for problems in data, and provides fixes for the common ones. Spellcheck integrated for tag names."/>
    2727                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/Validator"/>
    28                 <attribute name="Plugin-Mainversion" value="1815"/>
     28                <attribute name="Plugin-Mainversion" value="1893"/>
    2929                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    3030            </manifest>
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ErrorLayer.java

    r16409 r16788  
    112112    @Override
    113113    public Component[] getMenuEntries() {
    114         return new Component[] { new JMenuItem(new LayerListDialog.ShowHideLayerAction(this)),
    115                 new JMenuItem(new LayerListDialog.DeleteLayerAction(this)), new JSeparator(),
     114        return new Component[] { new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this)),
     115                new JMenuItem(LayerListDialog.getInstance().createDeleteLayerAction(this)),
     116                new JSeparator(),
    116117                new JMenuItem(new RenameLayerAction(null, this)), new JSeparator(),
    117118                new JMenuItem(new LayerListPopup.InfoAction(this)) };
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/GridLayer.java

    r16629 r16788  
    123123    {
    124124        return new Component[]{
    125                 new JMenuItem(new LayerListDialog.ShowHideLayerAction(this)),
    126                 new JMenuItem(new LayerListDialog.DeleteLayerAction(this)),
     125                new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this)),
     126                new JMenuItem(LayerListDialog.getInstance().createDeleteLayerAction(this)),
    127127                new JSeparator(),
    128128                new JMenuItem(new RenameLayerAction(null, this)),
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/OSMValidatorPlugin.java

    r16681 r16788  
    3131import org.openstreetmap.josm.data.projection.Mercator;
    3232import org.openstreetmap.josm.gui.MapFrame;
     33import org.openstreetmap.josm.gui.OptionPaneUtil;
    3334import org.openstreetmap.josm.gui.layer.Layer;
    3435import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     
    275276            } catch (InvocationTargetException ite) {
    276277                ite.getCause().printStackTrace();
    277                 JOptionPane.showMessageDialog(null, tr("Error initializing test {0}:\n {1}", test.getClass()
    278                         .getSimpleName(), ite.getCause().getMessage()));
     278                OptionPaneUtil.showMessageDialog(Main.parent,
     279                                tr("Error initializing test {0}:\n {1}", test.getClass()
     280                        .getSimpleName(), ite.getCause().getMessage()),
     281                        tr("Error"),
     282                        JOptionPane.ERROR_MESSAGE);
    279283            } catch (Exception e) {
    280284                e.printStackTrace();
    281                 JOptionPane.showMessageDialog(null, tr("Error initializing test {0}:\n {1}", test.getClass()
    282                         .getSimpleName(), e));
     285                OptionPaneUtil.showMessageDialog(Main.parent,
     286                                tr("Error initializing test {0}:\n {1}", test.getClass()
     287                        .getSimpleName(), e),
     288                        tr("Error"),
     289                        JOptionPane.ERROR_MESSAGE);
    283290            }
    284291        }
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidateUploadHook.java

    r16629 r16788  
    1616import org.openstreetmap.josm.data.osm.DataSet;
    1717import org.openstreetmap.josm.data.osm.OsmPrimitive;
     18import org.openstreetmap.josm.gui.OptionPaneUtil;
    1819import org.openstreetmap.josm.plugins.validator.util.AgregatePrimitivesVisitor;
    1920import org.openstreetmap.josm.tools.GBC;
     
    114115        p.add(new JScrollPane(errorPanel), GBC.eol());
    115116
    116         int res  = JOptionPane.showConfirmDialog(Main.parent, p,
    117         tr("Data with errors. Upload anyway?"), JOptionPane.YES_NO_OPTION);
     117        int res  = OptionPaneUtil.showConfirmationDialog(Main.parent, p,
     118        tr("Data with errors. Upload anyway?"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
    118119        if(res == JOptionPane.NO_OPTION)
    119120        {
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java

    r16681 r16788  
    3333import org.openstreetmap.josm.data.osm.WaySegment;
    3434import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
     35import org.openstreetmap.josm.gui.OptionPaneUtil;
    3536import org.openstreetmap.josm.gui.SideButton;
    3637import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
     
    190191                if (asked == JOptionPane.DEFAULT_OPTION) {
    191192                    String[] a = new String[] { tr("Whole group"), tr("Single elements"), tr("Nothing") };
    192                     asked = JOptionPane.showOptionDialog(Main.parent, tr("Ignore whole group or individual elements?"),
     193                    asked = OptionPaneUtil.showOptionDialog(Main.parent, tr("Ignore whole group or individual elements?"),
    193194                            tr("Ignoring elements"), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE,
    194                             ImageProvider.get("dialogs", "delete"), a, a[1]);
     195                            a, a[1]);
    195196                }
    196197                if (asked == JOptionPane.YES_NO_OPTION) {
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java

    r16438 r16788  
    4444import org.openstreetmap.josm.data.osm.Relation;
    4545import org.openstreetmap.josm.data.osm.Way;
     46import org.openstreetmap.josm.gui.OptionPaneUtil;
    4647import org.openstreetmap.josm.gui.preferences.TaggingPresetPreference;
    4748import org.openstreetmap.josm.gui.tagging.TaggingPreset;
     
    619620        addSrcButton.addActionListener(new ActionListener(){
    620621            public void actionPerformed(ActionEvent e) {
    621                 String source = JOptionPane.showInputDialog(Main.parent, tr("TagChecker source"));
     622                String source = OptionPaneUtil.showInputDialog(
     623                                Main.parent,
     624                                tr("TagChecker source"),
     625                                tr("TagChecker source"),
     626                                JOptionPane.QUESTION_MESSAGE
     627                                );
    622628                if (source != null)
    623629                    ((DefaultListModel)Sources.getModel()).addElement(source);
     
    639645                    if(Sources.getModel().getSize() == 0)
    640646                    {
    641                         String source = JOptionPane.showInputDialog(Main.parent, tr("TagChecker source"));
     647                        String source = OptionPaneUtil.showInputDialog(Main.parent, tr("TagChecker source"), tr("TagChecker source"), JOptionPane.QUESTION_MESSAGE);
    642648                        if (source != null)
    643649                            ((DefaultListModel)Sources.getModel()).addElement(source);
     
    645651                    else
    646652                    {
    647                         JOptionPane.showMessageDialog(Main.parent, tr("Please select the row to edit."));
     653                        OptionPaneUtil.showMessageDialog(
     654                                        Main.parent,
     655                                        tr("Please select the row to edit."),
     656                                        tr("Information"),
     657                                        JOptionPane.INFORMATION_MESSAGE
     658                                        );
    648659                    }
    649660                }
    650661                else {
    651                     String source = JOptionPane.showInputDialog(Main.parent, tr("TagChecker source"), Sources.getSelectedValue());
     662                        String source = (String)OptionPaneUtil.showInputDialog(Main.parent,
     663                                        tr("TagChecker source"),
     664                                        tr("TagChecker source"),
     665                                        JOptionPane.QUESTION_MESSAGE, null, null,
     666                                        Sources.getSelectedValue());
    652667                    if (source != null)
    653668                        ((DefaultListModel)Sources.getModel()).setElementAt(source, row);
     
    661676            public void actionPerformed(ActionEvent e) {
    662677                if (Sources.getSelectedIndex() == -1)
    663                     JOptionPane.showMessageDialog(Main.parent, tr("Please select the row to delete."));
     678                    OptionPaneUtil.showMessageDialog(Main.parent, tr("Please select the row to delete."), tr("Information"), JOptionPane.QUESTION_MESSAGE);
    664679                else {
    665680                    ((DefaultListModel)Sources.getModel()).remove(Sources.getSelectedIndex());
Note: See TracChangeset for help on using the changeset viewer.