Ignore:
Timestamp:
2012-08-18T19:21:29+02:00 (14 years ago)
Author:
Don-vip
Message:

Code refactorisation on EDT calls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java

    r5422 r5452  
    2424import javax.swing.JTabbedPane;
    2525import javax.swing.JTextField;
    26 import javax.swing.SwingUtilities;
    2726import javax.swing.event.DocumentEvent;
    2827import javax.swing.event.DocumentListener;
     
    3837import org.openstreetmap.josm.gui.SideButton;
    3938import org.openstreetmap.josm.gui.help.HelpUtil;
     39import org.openstreetmap.josm.gui.util.GuiHelper;
    4040import org.openstreetmap.josm.gui.widgets.AbstractTextComponentValidator;
    4141import org.openstreetmap.josm.gui.widgets.HtmlPanel;
     
    519519            };
    520520            e.printStackTrace();
    521             if (SwingUtilities.isEventDispatchThread()) {
    522                 r.run();
    523             } else {
    524                 SwingUtilities.invokeLater(r);
    525             }
     521            GuiHelper.runInEDT(r);
    526522        }
    527523
     
    552548                getProgressMonitor().worked(1);
    553549                if (canceled)return;
    554                 Runnable r = new Runnable() {
     550                GuiHelper.runInEDT(new Runnable() {
    555551                    public void run() {
    556552                        prepareUIForResultDisplay();
    557553                        setAccessToken(accessToken);
    558554                    }
    559                 };
    560                 if (SwingUtilities.isEventDispatchThread()) {
    561                     r.run();
    562                 } else {
    563                     SwingUtilities.invokeLater(r);
    564                 }
     555                });
    565556            } catch(final OsmOAuthAuthorizationException e) {
    566557                handleException(e);
Note: See TracChangeset for help on using the changeset viewer.