com.dlsc.flexgantt.policy.eventline
Interface IEditEventlineObjectPolicy

All Superinterfaces:
IPolicy
All Known Implementing Classes:
DefaultEditEventlineObjectPolicy

public interface IEditEventlineObjectPolicy
extends IPolicy

A policy that is used for making various decisions regarding the editing behaviour of eventline objects.

Since:
1.0
Author:
Dirk Lemmermann

Method Summary
 ICommand getChangeTimeSpanCommand(java.lang.Object eventlineObject, IEventlineModel model, ITimeSpan span)
          Returns a command object that will perform the actual change of the eventline object's time span.
 ICommand getCreateCommand(IEventlineModel model, ITimeSpan span)
          Returns a command object that will perform the actual creating of a new eventline object.
 ICommand getDeleteCommand(java.lang.Object eventlineObject, IEventlineModel model)
          Returns a command object that will perform the actual deletion of the eventline object.
 boolean isCreatable(IEventlineModel model, ITimeSpan span)
          Decides whether an eventline object may be created for the given model and with the given time span.
 boolean isDeletable(java.lang.Object eventlineObject, IEventlineModel model)
          Decides whether the eventline object may be deleted.
 boolean isDurationChangeable(java.lang.Object eventlineObject, IEventlineModel model)
          Decides whether the duration of an eventline object may be edited / changed.
 boolean isStartTimeChangeable(java.lang.Object eventlineObject, IEventlineModel model)
          Decides whether the start time of an eventline object may be edited / changed.
 

Method Detail

isStartTimeChangeable

boolean isStartTimeChangeable(java.lang.Object eventlineObject,
                              IEventlineModel model)
Decides whether the start time of an eventline object may be edited / changed.

Parameters:
eventlineObject - the eventline object that gets checked for its time span editing ability
model - the data source of the eventline object
Returns:
TRUE if the start time of the eventline object may be edited
Since:
1.0

isDurationChangeable

boolean isDurationChangeable(java.lang.Object eventlineObject,
                             IEventlineModel model)
Decides whether the duration of an eventline object may be edited / changed.

Parameters:
eventlineObject - the eventline object that gets checked for its time span editing ability
model - the data source of the eventline object
Returns:
TRUE if the duration of the eventline object may be edited
Since:
1.0

isDeletable

boolean isDeletable(java.lang.Object eventlineObject,
                    IEventlineModel model)
Decides whether the eventline object may be deleted.

Parameters:
eventlineObject - the eventline object that gets checked
model - the data source of the eventline object
Returns:
TRUE if the eventline object may be deleted
Since:
1.0

isCreatable

boolean isCreatable(IEventlineModel model,
                    ITimeSpan span)
Decides whether an eventline object may be created for the given model and with the given time span.

Parameters:
model - the model to which the newly created object will be added
span - the time span where the event object gets created
Returns:
TRUE if the eventline object may be deleted
Since:
1.0

getCreateCommand

ICommand getCreateCommand(IEventlineModel model,
                          ITimeSpan span)
Returns a command object that will perform the actual creating of a new eventline object.

Parameters:
model - the model to which the new object needs to be added
span - the time span for the new eventline object
Returns:
a command that will create a new eventline object
Since:
1.0

getChangeTimeSpanCommand

ICommand getChangeTimeSpanCommand(java.lang.Object eventlineObject,
                                  IEventlineModel model,
                                  ITimeSpan span)
Returns a command object that will perform the actual change of the eventline object's time span.

Parameters:
eventlineObject - the eventline object that gets checked for its editing ability
model - the data source of the eventline object
span - the new time span for the eventline object
Returns:
a command that will modify the eventline object's time span
Since:
1.0

getDeleteCommand

ICommand getDeleteCommand(java.lang.Object eventlineObject,
                          IEventlineModel model)
Returns a command object that will perform the actual deletion of the eventline object.

Parameters:
eventlineObject - the eventline object that gets deleted
model - the data source of the eventline object
Returns:
a command that will delete the eventline object
Since:
1.0