com.dlsc.flexgantt.command.layer

## Class DefaultMultiDragAndDropCommand

- java.lang.Object
- - com.dlsc.flexgantt.command.AbstractCommand
  - - com.dlsc.flexgantt.command.layer.AbstractDragAndDropCommand
    - - com.dlsc.flexgantt.command.layer.DefaultMultiDragAndDropCommand

- All Implemented Interfaces:
    ICommand, Serializable

      public class DefaultMultiDragAndDropCommand
      extends AbstractDragAndDropCommand

  A command that moves a given timeline object from one tree / hierarchy node to another. Additionally the timeline object's time span can be changed at the same time. This command can only be used in situations where the model is an instance of `DefaultGanttChartModel`, the old and the new tree node implement the `IGanttChartNode` interface, and the timeline object implements the `ITimelineObject` interface.
  Since:
    1.0
  Version:
    $Revision: 1.6 $
  Author:
    Dirk Lemmermann
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultMultiDragAndDropCommand(IGanttChartNode owner, ILayer layer, ITimelineObject[] timelineObjects, DefaultGanttChartModel model, IGanttChartNode newOwner, DefaultGanttChartModel newModel, int dropAction)` Constructs a new command.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `executeCommand(IProgressMonitor monitor)` Executes the command.
    `ITimelineObject[]` | `getTimelineObjects()` Returns the timeline objects that get dragged & dropped.
    `void` | `undoCommand(IProgressMonitor monitor)` Undos the command.

    - ### Methods inherited from class com.dlsc.flexgantt.command.layer.AbstractDragAndDropCommand

      `fixRelationships, getDropAction, getLayer, getNewModel, getNewOwner, getOldModel, getOldOwner`

    - ### 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

    - #### DefaultMultiDragAndDropCommand

          public DefaultMultiDragAndDropCommand(IGanttChartNode owner,
                                                ILayer layer,
                                                ITimelineObject[] timelineObjects,
                                                DefaultGanttChartModel model,
                                                IGanttChartNode newOwner,
                                                DefaultGanttChartModel newModel,
                                                int dropAction)

      Constructs a new command.
      Parameters:
        `owner` - the current owner / tree node on which to which the timeline object is assigned
        `layer` - the layer on which the timeline object gets currently displayed
        `timelineObjects` - the timeline objects that get dragged & dropped
        `model` - the model in which the owner and the timeline object are stored
        `newOwner` - the new owner / tree node to which the timeline object gets assigned
        `newModel` - the new model in which the timeline object gets stored
        `dropAction` - the type of drop performed (possible values are listed in `DnDConstants`)
      Since:
        1.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

    - #### getTimelineObjects

          public ITimelineObject[] getTimelineObjects()

      Returns the timeline objects that get dragged & dropped.
      Returns:
        the timeline object
      Since:
        1.0

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