Examples of ElevationService


Examples of slash.navigation.elevation.ElevationService

*/

public class ElevationServiceListCellRenderer extends DefaultListCellRenderer {
    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
        JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
        ElevationService service = ElevationService.class.cast(value);
        label.setText(service.getName());
        return label;
    }
View Full Code Here

Examples of slash.navigation.elevation.ElevationService

    public List<ElevationService> getElevationServices() {
        return elevationServices;
    }

    public ElevationService getElevationService() {
        ElevationService firstElevationService = getElevationServices().size() > 0 ? getElevationServices().get(0) : null;
        if (firstElevationService == null)
            return null;

        String lookupServiceName = preferences.get(ELEVATION_SERVICE, firstElevationService.getName());

        for (ElevationService service : getElevationServices()) {
            if (lookupServiceName.endsWith(service.getName()))
                return service;
        }

        if (!loggedFailedWarning) {
            log.warning(format("Failed to find elevation service %s; using first %s", lookupServiceName, firstElevationService.getName()));
            loggedFailedWarning = true;
        }
        return firstElevationService;
    }
View Full Code Here

Examples of slash.navigation.elevation.ElevationService

        comboBoxElevationService.setRenderer(new ElevationServiceListCellRenderer());
        comboBoxElevationService.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent e) {
                if (e.getStateChange() != SELECTED)
                    return;
                ElevationService service = ElevationService.class.cast(e.getItem());
                r.getElevationServiceFacade().setElevationService(service);
                handleElevationServiceUpdate();
            }
        });
View Full Code Here

Examples of slash.navigation.elevation.ElevationService

        travelModeModel.setSelectedItem(serviceFacade.getTravelMode());
        comboboxTravelMode.setModel(travelModeModel);
    }

    private void handleElevationServiceUpdate() {
        ElevationService service = RouteConverter.getInstance().getElevationServiceFacade().getElevationService();
        textFieldElevationServicePath.setEnabled(service.isDownload());
        textFieldElevationServicePath.setText(service.isDownload() ? service.getPath() : "");
        buttonChooseElevationServicePath.setEnabled(service.isDownload());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.