Ignore:
Timestamp:
2009-07-25T23:44:19+02:00 (15 years ago)
Author:
Gubaer
Message:

replaced calls to JOptionPane.* by calls to OptionPaneUtil.*

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java

    r1820 r1847  
    2323import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2424import org.openstreetmap.josm.gui.ExtendedDialog;
     25import org.openstreetmap.josm.gui.OptionPaneUtil;
    2526import org.openstreetmap.josm.tools.GBC;
    2627import org.openstreetmap.josm.tools.Shortcut;
     
    4748            return;
    4849        if (Main.map == null) {
    49             JOptionPane.showMessageDialog(Main.parent, tr("No data loaded."));
     50            OptionPaneUtil.showMessageDialog(
     51                    Main.parent,
     52                    tr("Can't search because there is no loaded data."),
     53                    tr("Warning"),
     54                    JOptionPane.WARNING_MESSAGE
     55            );
    5056            return;
    5157        }
     
    190196                }
    191197                Main.map.statusLine.setHelpText(msg);
    192                 JOptionPane.showMessageDialog(Main.parent, msg);
     198                OptionPaneUtil.showMessageDialog(
     199                        Main.parent,
     200                        msg,
     201                        tr("Warning"),
     202                        JOptionPane.WARNING_MESSAGE
     203                );
    193204            } else {
    194205                Main.map.statusLine.setHelpText(tr("Found {0} matches", foundMatches));
    195206            }
    196207        } catch (SearchCompiler.ParseError e) {
    197             JOptionPane.showMessageDialog(Main.parent, e.getMessage());
     208            OptionPaneUtil.showMessageDialog(
     209                    Main.parent,
     210                    e.getMessage(),
     211                    tr("Error"),
     212                    JOptionPane.ERROR_MESSAGE
     213
     214            );
    198215        }
    199216    }
Note: See TracChangeset for help on using the changeset viewer.