com.dlsc.flexgantt.command.eventline
Class DefaultDeleteEventlineObjectCommand

java.lang.Object
  extended by com.dlsc.flexgantt.command.AbstractCommand
      extended by com.dlsc.flexgantt.command.eventline.DefaultDeleteEventlineObjectCommand
All Implemented Interfaces:
ICommand, java.io.Serializable

public class DefaultDeleteEventlineObjectCommand
extends AbstractCommand

A command that is used to delete an eventline object from the eventline model. This command can only be used in situations where the model is an instance of DefaultEventlineModel and the eventline object implements the IEventlineObject interface.

Since:
1.0
Author:
Dirk Lemmermann
See Also:
DefaultEventlineModel.removeEventlineObject(IEventlineObject), IEventlineObject, IEditEventlineObjectPolicy.getDeleteCommand(Object, com.dlsc.flexgantt.model.eventline.IEventlineModel), Serialized Form

Constructor Summary
DefaultDeleteEventlineObjectCommand(IEventlineObject object, DefaultEventlineModel model)
          Constructs a new command.
 
Method Summary
 void executeCommand(IProgressMonitor monitor)
          Executes the command.
 IEventlineObject getEventlineObject()
          Returns the eventline object that was / will be deleted
 DefaultEventlineModel getModel()
          Returns the model of which the eventline object is a member.
 void undoCommand(IProgressMonitor monitor)
          Undos the command.
 
Methods inherited from class com.dlsc.flexgantt.command.AbstractCommand
getName, isRedoable, isRelevant, isUndoable, redoCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDeleteEventlineObjectCommand

public DefaultDeleteEventlineObjectCommand(IEventlineObject object,
                                           DefaultEventlineModel model)
Constructs a new command.

Parameters:
object - the eventline object that will be deleted
model - the model of which the object is a member
Since:
1.0
Method Detail

executeCommand

public void executeCommand(IProgressMonitor monitor)
Description copied from interface: ICommand
Executes the command.

Parameters:
monitor - a progress monitor

undoCommand

public void undoCommand(IProgressMonitor monitor)
Description copied from interface: ICommand
Undos the command.

Parameters:
monitor - a progress monitor

getEventlineObject

public IEventlineObject getEventlineObject()
Returns the eventline object that was / will be deleted

Returns:
the deleted eventline object
Since:
1.0

getModel

public DefaultEventlineModel getModel()
Returns the model of which the eventline object is a member.

Returns:
the data source to which the eventline object belongs
Since:
1.0