Ignore:
Timestamp:
2009-07-19T17:38:55+02:00 (15 years ago)
Author:
jttt
Message:

PleaseWait refactoring. Progress is now reported using ProgressMonitor interface, that is available through PleaseWaitRunnable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/OsmHistoryReader.java

    r1670 r1811  
    1818import org.openstreetmap.josm.data.osm.history.HistoryRelation;
    1919import org.openstreetmap.josm.data.osm.history.HistoryWay;
    20 import org.openstreetmap.josm.gui.PleaseWaitDialog;
     20import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    2121import org.openstreetmap.josm.tools.DateUtils;
    2222import org.xml.sax.Attributes;
     
    3232 * {@see OsmPrimitive}s. We use objects derived from {@see HistoryOsmPrimitive} instead and we
    3333 * keep the data in a dedicated {@see HistoryDataSet}.
    34  * 
     34 *
    3535 */
    3636public class OsmHistoryReader {
     
    210210    }
    211211
    212     public HistoryDataSet parse(PleaseWaitDialog dialog) throws SAXException, IOException {
     212    public HistoryDataSet parse(ProgressMonitor progressMonitor) throws SAXException, IOException {
    213213        InputSource inputSource = new InputSource(new InputStreamReader(in, "UTF-8"));
    214         dialog.currentAction.setText("Parsing OSM history data ...");
     214        progressMonitor.beginTask(tr("Parsing OSM history data ..."));
    215215        try {
    216216            SAXParserFactory.newInstance().newSAXParser().parse(inputSource, new Parser());
     
    218218            e1.printStackTrace(); // broken SAXException chaining
    219219            throw new SAXException(e1);
     220        } finally {
     221            progressMonitor.finishTask();
    220222        }
    221223        return data;
Note: See TracChangeset for help on using the changeset viewer.