Package slash.navigation.base

Examples of slash.navigation.base.FormatAndRoutes


                try {
                    invokeAndWait(new Runnable() {
                        public void run() {
                            Gpx11Format gpxFormat = new Gpx11Format();
                            formatAndRoutesModel.setRoutes(new FormatAndRoutes(gpxFormat, new GpxRoute(gpxFormat)));
                            urlModel.clear();
                        }
                    });

                    final ParserResult result = parser.read(url, formats);
                    if (result.isSuccessful()) {
                        log.info("Opened: " + path);
                        final NavigationFormat format = result.getFormat();
                        countRead(format);
                        if (!checkReadFormat(format))
                            return;
                        invokeLater(new Runnable() {
                            public void run() {
                                formatAndRoutesModel.setRoutes(new FormatAndRoutes(format, result.getAllRoutes()));
                                comboBoxChoosePositionList.setModel(formatAndRoutesModel);
                                urlModel.setString(path);
                                recentUrlsModel.addUrl(url);

                                if (urls.size() > 1) {
                                    List<URL> append = new ArrayList<>(urls);
                                    append.remove(0);
                                    // this way the route is always marked as modified :-(
                                    appendPositionList(-1, append);
                                }
                            }
                        });

                    } else {
                        invokeLater(new Runnable() {
                            public void run() {
                                Gpx11Format gpxFormat = new Gpx11Format();
                                formatAndRoutesModel.setRoutes(new FormatAndRoutes(gpxFormat, new GpxRoute(gpxFormat)));
                            }
                        });
                        r.handleUnsupportedFormat(path);
                    }
                } catch (BabelException e) {
View Full Code Here


        startWaitCursor(r.getFrame().getRootPane());
        try {
            Gpx11Format gpxFormat = new Gpx11Format();
            GpxRoute gpxRoute = new GpxRoute(gpxFormat);
            gpxRoute.setName(MessageFormat.format(RouteConverter.getBundle().getString("new-positionlist-name"), 1));
            formatAndRoutesModel.setRoutes(new FormatAndRoutes(gpxFormat, gpxRoute));
            urlModel.clear();
            prepareForNewPositionList();
        } finally {
            stopWaitCursor(r.getFrame().getRootPane());
        }
View Full Code Here

TOP

Related Classes of slash.navigation.base.FormatAndRoutes

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.