Package org.openstreetmap.josm.gui.dialogs

Examples of org.openstreetmap.josm.gui.dialogs.LatLonDialog$LatLonHolder


    @Override
    public void actionPerformed(ActionEvent e) {
        if (!isEnabled() || (getCurrentDataSet().getSelectedNodes().size() != 1))
            return;

        LatLonDialog dialog = new LatLonDialog(Main.parent, tr("Move Node..."), ht("/Action/MoveNode"));
        Node n = (Node) getCurrentDataSet().getSelectedNodes().toArray()[0];
        dialog.setCoordinates(n.getCoor());
        dialog.showDialog();
        if (dialog.getValue() != 1)
            return;

        LatLon coordinates = dialog.getCoordinates();
        if (coordinates == null)
            return;

        // move the node
        Main.main.undoRedo.add(new MoveCommand(n, coordinates));
View Full Code Here


    @Override
    public void actionPerformed(ActionEvent e) {
        if (!isEnabled())
            return;

        LatLonDialog dialog = new LatLonDialog(Main.parent, tr("Add Node..."), ht("/Action/AddNode"));

        if (textLatLon != null) {
            dialog.setLatLonText(textLatLon);
        }
        if (textEastNorth != null) {
            dialog.setEastNorthText(textEastNorth);
        }

        dialog.showDialog();

        if (dialog.getValue() != 1)
            return;

        LatLon coordinates = dialog.getCoordinates();
        if (coordinates == null)
            return;

        textLatLon = dialog.getLatLonText();
        textEastNorth = dialog.getEastNorthText();

        Node nnew = new Node(coordinates);

        // add the node
        Main.main.undoRedo.add(new AddCommand(nnew));
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.gui.dialogs.LatLonDialog$LatLonHolder

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.