Interface Command

All Known Implementing Classes:
AbstractCommand, AbstractTransaction, AddAnchorCommand, AppendQueriesCommand, ChangeAnchorCommand, ChangeMessageEndCommand, ClearQueriesCommand, CompoundCommand, InsertAnchoredElementCommand, InsertEdgeCommand, InsertElementCommand, InsertInstanceCommand, InsertMessageCommand, InsertQueryCommand, InsertTemplateCommand, InsertTextCommand, MoveTemplateCommand, RemoveAnchorCommand, RemoveElementCommand, RemoveLscElementCommand, RemoveQueryCommand, RemoveTemplateCommand, RemoveTextCommand, SetEndPointCommand, SetLengthCommand, SetPropertyCommand, SetPropertyWithPositionCommand, SetQueryCommand, SetSourceCommand, SetTargetCommand, SnapCommand, TranslationCommand, TranslationMessageLabelCommand, TranslationXCommand, TranslationYCommand

public interface Command
Interface for commands. See command pattern.
  • Method Details

    • execute

      void execute()
    • undo

      void undo()
    • setVersion

      void setVersion​(int version)
    • getVersion

      int getVersion()
    • merge

      boolean merge​(Command next)
      Merge the next command (meant for storage, it still needs to be executed before storage)
      Parameters:
      next - the next command
      Returns:
      true if merge is successful
    • getModifiedElement

      Element getModifiedElement()
      Returns:
      the modified element or its closest relative (sibling or parent) if the element is not displayed.