Package org.openstreetmap.josm.command

Examples of org.openstreetmap.josm.command.SequenceCommand


            c.add(reverseCommand);
            return c;
        }

        public Command getAsSequenceCommand() {
            return new SequenceCommand(tr("Reverse way"), getCommands());
        }
View Full Code Here


        }

        //Delete all relations in the list
        relFix.remove(relationToKeep);
        commands.add(new DeleteCommand(relFix));
        return new SequenceCommand(tr("Delete duplicate relations"), commands);
    }
View Full Code Here

        Collection<Command> cmds = new ArrayList<>(nodes.size());
        Line line = new Line(anchors[0], anchors[1]);
        for(Node node: nodes)
            if(node != anchors[0] && node != anchors[1])
                cmds.add(line.projectionCommand(node));
        return new SequenceCommand(tr("Align Nodes in Line"), cmds);
    }
View Full Code Here

                cmds.add(cmd);
            }
            else
                throw new InvalidSelection(tr("Intersection of three or more ways can not be solved. Abort."));
        }
        return new SequenceCommand(tr("Align Nodes in Line"), cmds);
    }
View Full Code Here

            Way newWay = new Way(existingWay);
            newWay.setNodes(wayToAdd);
            cmds.add(new ChangeCommand(existingWay, newWay));
        }

        Main.main.undoRedo.add(new SequenceCommand(tr("Create Circle"), cmds));
        Main.map.repaint();
    }
View Full Code Here

        //Delete all ways in the list
        //Note: nodes are not deleted, these can be detected and deleted at next pass
        ways.remove(wayToKeep);
        commands.add(new DeleteCommand(ways));
        return new SequenceCommand(tr("Delete duplicate ways"), commands);
    }
View Full Code Here

                return;
            }
            c.addAll(revResult.getCommands());
            propertiesUpdated |= !revResult.getTagCorrectionCommands().isEmpty();
        }
        Main.main.undoRedo.add(new SequenceCommand(tr("Reverse ways"), c));
        if (propertiesUpdated) {
            getCurrentDataSet().fireSelectionChanged();
        }
        Main.map.repaint();
    }
View Full Code Here

                cmds.add(new DeleteCommand(nodesToDelete));
            }
            if (!waysToDelete.isEmpty()) {
                cmds.add(new DeleteCommand(waysToDelete));
            }
            return new SequenceCommand(/* for correct i18n of plural forms - see #9110 */
                    trn("Merge {0} node", "Merge {0} nodes", nodes.size(), nodes.size()), cmds);
        } catch (UserCancelException ex) {
            return null;
        }
    }
View Full Code Here

        if (cmds.size() == 0)
            return null;
        else if (cmds.size() == 1)
            return cmds.get(0);
        else
            return new SequenceCommand(tr("Change Tags"), cmds);
    }
View Full Code Here

                    .setIcon(JOptionPane.WARNING_MESSAGE)
                    .show();
        }

        return new SplitWayResult(
                new SequenceCommand(
                        /* for correct i18n of plural forms - see #9110 */
                        trn("Split way {0} into {1} part", "Split way {0} into {1} parts", wayChunks.size(),
                                way.getDisplayName(DefaultNameFormatter.getInstance()), wayChunks.size()),
                        commandList
                        ),
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.command.SequenceCommand

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.