Class ChangePropertyKeyCommand

    • Field Detail

      • key

        private final String key
        The key that is subject to change.
    • Constructor Detail

      • ChangePropertyKeyCommand

        public ChangePropertyKeyCommand​(OsmPrimitive object,
                                        String key,
                                        String newKey)
        Constructs a new ChangePropertyKeyCommand.
        Parameters:
        object - the object subject to change replacement. Must not be null, and belong to a data set
        key - The key to replace
        newKey - the new value of the key
        Since:
        6329
      • ChangePropertyKeyCommand

        public ChangePropertyKeyCommand​(DataSet ds,
                                        Collection<? extends OsmPrimitive> objects,
                                        String key,
                                        String newKey)
        Constructs a new ChangePropertyKeyCommand.
        Parameters:
        ds - The target data set. Must not be null
        objects - all objects subject to change replacement.
        key - The key to replace
        newKey - the new value of the key
        Since:
        12726
    • Method Detail

      • 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
      • getDescriptionText

        public String getDescriptionText()
        Description copied from interface: PseudoCommand
        Provides a description text representing this command.
        Returns:
        description text representing this command
      • getDescriptionIcon

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

        public Collection<PseudoCommandgetChildren()
        Description copied from interface: PseudoCommand
        Returns the subcommands of this command. Override for subclasses that have child commands.
        Returns:
        the subcommands, null if there are no child commands