Package org.optaplanner.examples.common.swingui.latitudelongitude

Examples of org.optaplanner.examples.common.swingui.latitudelongitude.LatitudeLongitudeTranslator


    public LatitudeLongitudeTranslator getTranslator() {
        return translator;
    }

    public void reset(VehicleRoutingSolution solution, Dimension size, ImageObserver imageObserver) {
        translator = new LatitudeLongitudeTranslator();
        for (Location location : solution.getLocationList()) {
            translator.addCoordinates(location.getLatitude(), location.getLongitude());
        }

        int maximumTimeWindowTime = determineMaximumTimeWindowTime(solution);
View Full Code Here


            }
        });
        addMouseListener(new MouseAdapter() {
            @Override
            public void mousePressed(MouseEvent e) {
                LatitudeLongitudeTranslator translator = solutionPainter.getTranslator();
                if (translator != null) {
                    double longitude = translator.translateXToLongitude(e.getX());
                    double latitude = translator.translateYToLatitude(e.getY());
                    VehicleRoutingWorldPanel.this.vehicleRoutingPanel.insertLocationAndCustomer(longitude, latitude);
                }
            }
        });
    }
View Full Code Here

        });
        europaBackground = new ImageIcon(getClass().getResource("europaBackground.png"));
    }

    public void resetPanel(TravelingSalesmanTour travelingSalesmanTour) {
        translator = new LatitudeLongitudeTranslator();
        for (Location location : travelingSalesmanTour.getLocationList()) {
            translator.addCoordinates(location.getLatitude(), location.getLongitude());
        }

        Dimension size = getSize();
View Full Code Here

TOP

Related Classes of org.optaplanner.examples.common.swingui.latitudelongitude.LatitudeLongitudeTranslator

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.