Class ChangePropertyCommand<T>

  • All Implemented Interfaces:
    ICommand
    Direct Known Subclasses:
    SetPropertyCommand

    public class ChangePropertyCommand<T>
    extends AbstractCommand
    A command used to modify the simple property of a node. Should not be used to modify complex (object) properties, only simple property types like string, boolean, number, etc.
    Author:
    eric.wittmann@gmail.com
    • Field Detail

      • _property

        public String _property
      • _newValue

        public T _newValue
      • _oldValue

        public T _oldValue
    • Constructor Detail

      • ChangePropertyCommand

        public ChangePropertyCommand()
        Constructor.
      • ChangePropertyCommand

        public ChangePropertyCommand​(Node node,
                                     String property,
                                     T newValue)
        C'tor.
    • Method Detail

      • undo

        public void undo​(Document document)
        Description copied from interface: ICommand
        Called to undo the command (restore the document to a previous state).