Ignore:
Timestamp:
2009-08-30T19:07:24+02:00 (17 years ago)
Author:
Gubaer
Message:

removed OptionPaneUtil
cleanup of deprecated Layer API
cleanup of deprecated APIs in OsmPrimitive and Way
cleanup of imports

Location:
trunk/src/org/openstreetmap/josm/tools
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java

    r1865 r2017  
    1515
    1616import org.openstreetmap.josm.Main;
    17 import org.openstreetmap.josm.gui.OptionPaneUtil;
    1817
    1918/**
     
    340339
    341340    public static void audioMalfunction(Exception ex) {
    342         OptionPaneUtil.showMessageDialog(Main.parent,
     341        JOptionPane.showMessageDialog(Main.parent,
    343342                "<html><p>" + tr(ex.getMessage()) + "</p></html>",
    344343                tr("Error playing sound"), JOptionPane.ERROR_MESSAGE);
  • trunk/src/org/openstreetmap/josm/tools/AudioUtil.java

    r1685 r2017  
    22package org.openstreetmap.josm.tools;
    33
    4 import java.io.IOException;
     4import java.io.File;
    55import java.net.URL;
    6 import java.io.File;
    76
    87import javax.sound.sampled.AudioFormat;
  • trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java

    r1882 r2017  
    2121import org.openstreetmap.josm.Main;
    2222import org.openstreetmap.josm.actions.ShowStatusReportAction;
    23 import org.openstreetmap.josm.gui.OptionPaneUtil;
    2423import org.openstreetmap.josm.plugins.PluginHandler;
    2524
     
    3938            if (e instanceof OutOfMemoryError) {
    4039                // do not translate the string, as translation may raise an exception
    41                 OptionPaneUtil.showMessageDialog(Main.parent, "JOSM is out of memory. " +
     40                JOptionPane.showMessageDialog(Main.parent, "JOSM is out of memory. " +
    4241                        "Strange things may happen.\nPlease restart JOSM with the -Xmx###M option,\n" +
    4342                        "where ### is the the number of MB assigned to JOSM (e.g. 256).\n" +
     
    5352
    5453            Object[] options = new String[]{tr("Do nothing"), tr("Report Bug")};
    55             int answer = OptionPaneUtil.showOptionDialog(Main.parent, tr("An unexpected exception occurred.\n\n" +
     54            int answer = JOptionPane.showOptionDialog(Main.parent, tr("An unexpected exception occurred.\n\n" +
    5655                    "This is always a coding error. If you are running the latest\n" +
    5756            "version of JOSM, please consider being kind and file a bug report."),
    58             tr("Unexpected Exception"), JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE,
     57            tr("Unexpected Exception"), JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE,null,
    5958            options, options[0]);
    6059            if (answer == 1) {
     
    8483                    p.add(new JScrollPane(info), GBC.eop());
    8584
    86                     OptionPaneUtil.showMessageDialog(Main.parent, p, tr("Warning"), JOptionPane.WARNING_MESSAGE);
     85                    JOptionPane.showMessageDialog(Main.parent, p, tr("Warning"), JOptionPane.WARNING_MESSAGE);
    8786                } catch (Exception e1) {
    8887                    e1.printStackTrace();
  • trunk/src/org/openstreetmap/josm/tools/I18n.java

    r1802 r2017  
    55import java.util.Arrays;
    66import java.util.Comparator;
     7import java.util.LinkedList;
    78import java.util.Locale;
    8 import java.util.LinkedList;
    99import java.util.MissingResourceException;
    1010import java.util.Vector;
     11
    1112import org.openstreetmap.josm.gui.MainApplication;
    1213import org.xnap.commons.i18n.I18nFactory;
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r1879 r2017  
    11// License: GPL. Copyright 2007 by Immanuel Scholz and others
    22package org.openstreetmap.josm.tools;
     3
     4import static org.openstreetmap.josm.tools.I18n.tr;
    35
    46import java.awt.Component;
     
    3133import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
    3234import org.openstreetmap.josm.io.MirroredInputStream;
    33 import static org.openstreetmap.josm.tools.I18n.tr;
    3435
    3536/**
  • trunk/src/org/openstreetmap/josm/tools/PlatformHook.java

    r1195 r2017  
    11// License: GPL. Copyright 2007 by Immanuel Scholz and others
    22package org.openstreetmap.josm.tools;
    3 
    4 import org.openstreetmap.josm.tools.Shortcut;
    53
    64import java.io.IOException;
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java

    r1842 r2017  
    1111
    1212import org.openstreetmap.josm.Main;
    13 import org.openstreetmap.josm.actions.mapmode.SelectAction;
    1413
    1514/**
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java

    r1195 r2017  
    22package org.openstreetmap.josm.tools;
    33
    4 import org.openstreetmap.josm.tools.Shortcut;
    5 import org.openstreetmap.josm.Main;
    6 
    74import java.awt.event.KeyEvent;
    85import java.io.IOException;
     6
     7import org.openstreetmap.josm.Main;
    98
    109/**
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java

    r1415 r2017  
    22package org.openstreetmap.josm.tools;
    33
    4 import org.openstreetmap.josm.tools.Shortcut;
    5 import org.openstreetmap.josm.tools.PlatformHookUnixoid;
    6 import org.openstreetmap.josm.Main;
    7 
    84import java.awt.event.KeyEvent;
    95import java.io.IOException;
     6
     7import org.openstreetmap.josm.Main;
    108
    119/**
  • trunk/src/org/openstreetmap/josm/tools/Shortcut.java

    r1865 r2017  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
    5 import org.openstreetmap.josm.Main;
    6 import org.openstreetmap.josm.gui.OptionPaneUtil;
    75
    86import java.awt.event.KeyEvent;
     7import java.util.Collection;
    98import java.util.HashMap;
    109import java.util.LinkedHashMap;
    1110import java.util.Map;
    12 import java.util.Collection;
     11
    1312import javax.swing.AbstractButton;
    14 import javax.swing.KeyStroke;
    1513import javax.swing.JMenu;
    1614import javax.swing.JOptionPane;
     15import javax.swing.KeyStroke;
     16
     17import org.openstreetmap.josm.Main;
    1718
    1819/**
     
    444445    // a lengthy warning message
    445446    private static void displayWarning(Shortcut conflictsWith, Shortcut potentialShortcut, String shortText, String longText) {
    446         OptionPaneUtil.showMessageDialog(Main.parent,
     447        JOptionPane.showMessageDialog(Main.parent,
    447448                tr("Setting the keyboard shortcut ''{0}'' for the action ''{1}'' ({2}) failed\n"+
    448449                        "because the shortcut is already taken by the action ''{3}'' ({4}).\n\n",
  • trunk/src/org/openstreetmap/josm/tools/WikiReader.java

    r1879 r2017  
    11// License: GPL. Copyright 2007 by Immanuel Scholz and others
    22package org.openstreetmap.josm.tools;
     3
     4import static org.openstreetmap.josm.tools.I18n.tr;
    35
    46import java.io.BufferedReader;
     
    911
    1012import org.openstreetmap.josm.Main;
    11 import org.openstreetmap.josm.tools.LanguageInfo;
    12 
    13 import static org.openstreetmap.josm.tools.I18n.tr;
    1413
    1514/**
  • trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java

    r1755 r2017  
    2020import org.xml.sax.SAXException;
    2121import org.xml.sax.helpers.DefaultHandler;
    22 
    23 import org.openstreetmap.josm.tools.LanguageInfo;
    2422
    2523/**
Note: See TracChangeset for help on using the changeset viewer.