Class AbstractNodesCommand<C extends java.util.Collection<Node>>

    • Field Detail

      • way

        protected final Way way
      • cmdNodes

        protected final C extends java.util.Collection<Node> cmdNodes
    • Constructor Detail

      • AbstractNodesCommand

        protected AbstractNodesCommand​(Way way,
                                       C cmdNodes)
        Constructs a new AbstractNodesCommand.
        Parameters:
        way - The way to modify
        cmdNodes - The collection of nodes for this command
      • AbstractNodesCommand

        protected AbstractNodesCommand​(DataSet ds,
                                       Way way,
                                       C cmdNodes)
        Constructs a new AbstractNodesCommand.
        Parameters:
        ds - The target data set. Must not be null
        way - The way to modify
        cmdNodes - The collection of nodes for this command
    • Method Detail

      • modifyWay

        protected abstract void modifyWay()
      • executeCommand

        public boolean executeCommand()
        Description copied from class: Command
        Executes the command on the dataset. This implementation will remember all primitives returned by fillModifiedData for restoring them on undo.

        The layer should be invalidated after execution so that it can be re-painted.

        Overrides:
        executeCommand in class Command
        Returns:
        true
      • fillModifiedData

        public void fillModifiedData​(java.util.Collection<OsmPrimitive> modified,
                                     java.util.Collection<OsmPrimitive> deleted,
                                     java.util.Collection<OsmPrimitive> added)
        Description copied from class: Command
        Fill in the changed data this command operates on. Add to the lists, don't clear them.
        Specified by:
        fillModifiedData in class Command
        Parameters:
        modified - The modified primitives
        deleted - The deleted primitives
        added - The added primitives
      • getDescriptionIcon

        public javax.swing.Icon getDescriptionIcon()
        Description copied from interface: PseudoCommand
        Provides a descriptive icon of this command.
        Returns:
        descriptive icon of this command
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class Command