Package slash.navigation.fpl

Examples of slash.navigation.fpl.WaypointType


        position.setWaypointType(UserWaypoint);
        WptType wptType = getOrigin(WptType.class);
        if (wptType != null) {
            String type = trim(wptType.getType());
            if (type != null) {
                WaypointType waypointType = WaypointType.fromValue(type);
                position.setWaypointType(waypointType);

                String name = wptType.getName();
                if (name != null && name.length() >= 2)
                    position.setCountryCode(CountryCode.fromValue(name.substring(0, 2)));
View Full Code Here


*/

public class WaypointTypeListCellRenderer 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);
        WaypointType waypointType = WaypointType.class.cast(value);
        String text;
        if (waypointType != null)
            text = RouteConverter.getBundle().getString("waypoint-type-" + waypointType.name().toLowerCase()) +
                    " (" + waypointType.value() + ")";
        else
            text = null;
        label.setText(text);
        return label;
    }
View Full Code Here

        comboBoxWaypointType.setModel(new DefaultComboBoxModel(WaypointType.values()));
        comboBoxWaypointType.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent e) {
                if (e.getStateChange() != SELECTED)
                    return;
                WaypointType waypointType = (WaypointType) e.getItem();
                getPosition().setWaypointType(waypointType);
                validateModel();
            }
        });
View Full Code Here

TOP

Related Classes of slash.navigation.fpl.WaypointType

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.