com.dlsc.flexgantt.command.layer

## Class DefaultDeleteRelationshipCommand

- java.lang.Object
- - com.dlsc.flexgantt.command.AbstractCommand
  - - com.dlsc.flexgantt.command.layer.DefaultDeleteRelationshipCommand

- All Implemented Interfaces:
    ICommand, Serializable

      public class DefaultDeleteRelationshipCommand
      extends AbstractCommand

  A commetn to delete a relationship from the Gantt chart model.
  Since:
    2.0
  Author:
    Dirk Lemmermann
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultDeleteRelationshipCommand(IRelationship relationship, DefaultGanttChartModel model)` Constructs a new command for deleting a relationship from a Gantt chart model.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `executeCommand(IProgressMonitor monitor)` Executes the command.
    `DefaultGanttChartModel` | `getModel()` Returns the model from which the relationship was removed.
    `IRelationship` | `getRelationship()` Returns the relationship that was deleted from the model.
    `void` | `undoCommand(IProgressMonitor monitor)` Undos the command.

    - ### Methods inherited from class com.dlsc.flexgantt.command.AbstractCommand

      `getName, isRedoable, isRelevant, isUndoable, redoCommand, setName`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultDeleteRelationshipCommand

          public DefaultDeleteRelationshipCommand(IRelationship relationship,
                                                  DefaultGanttChartModel model)

      Constructs a new command for deleting a relationship from a Gantt chart model.
      Parameters:
        `relationship` -
        `model` -
      Since:
        2.0

  - ### Method Detail

    - #### executeCommand

          public void executeCommand(IProgressMonitor monitor)
                              throws CommandException

      Description copied from interface: `ICommand`
      Executes the command.
      Parameters:
        `monitor` - a progress monitor
      Throws:
        `CommandException` - if anything during the execution of the command has gone wrong

    - #### undoCommand

          public void undoCommand(IProgressMonitor monitor)
                           throws CommandException

      Description copied from interface: `ICommand`
      Undos the command.
      Parameters:
        `monitor` - a progress monitor
      Throws:
        `CommandException` - if anything during the execution of the command has gone wrong

    - #### getRelationship

          public IRelationship getRelationship()

      Returns the relationship that was deleted from the model.
      Returns:
        the deleted relationship
      Since:
        2.0

    - #### getModel

          public DefaultGanttChartModel getModel()

      Returns the model from which the relationship was removed.
      Returns:
        the Gantt chart model
      Since:
        2.0

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.