public class DefaultEditEventlineObjectPolicy extends AbstractPolicy implements IEditEventlineObjectPolicy
IEditEventlineObjectPolicy
works in
combination with the DefaultEventlineModel
and eventline objects that
implement the IEventlineObject
interface.Constructor and Description |
---|
DefaultEditEventlineObjectPolicy() |
Modifier and Type | Method and Description |
---|---|
ICommand |
getChangeTimeSpanCommand(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(Collection<Object> eventlineObjects,
IEventlineModel model)
Returns a command object that will perform the actual deletion of the
eventline objects.
|
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(Object eventlineObject,
IEventlineModel model)
Decides whether the eventline object may be deleted.
|
boolean |
isDurationChangeable(Object eventlineObject,
IEventlineModel model)
Decides whether the duration of an eventline object may be edited /
changed.
|
boolean |
isStartTimeChangeable(Object eventlineObject,
IEventlineModel model)
Decides whether the start time of an eventline object may be edited /
changed.
|
assertClass
public boolean isStartTimeChangeable(Object eventlineObject, IEventlineModel model)
IEditEventlineObjectPolicy
isStartTimeChangeable
in interface IEditEventlineObjectPolicy
eventlineObject
- the eventline object that gets checked for its time span
editing abilitymodel
- the data source of the eventline objectpublic boolean isDurationChangeable(Object eventlineObject, IEventlineModel model)
IEditEventlineObjectPolicy
isDurationChangeable
in interface IEditEventlineObjectPolicy
eventlineObject
- the eventline object that gets checked for its time span
editing abilitymodel
- the data source of the eventline objectpublic boolean isDeletable(Object eventlineObject, IEventlineModel model)
IEditEventlineObjectPolicy
isDeletable
in interface IEditEventlineObjectPolicy
eventlineObject
- the eventline object that gets checkedmodel
- the data source of the eventline objectpublic boolean isCreatable(IEventlineModel model, ITimeSpan span)
IEditEventlineObjectPolicy
isCreatable
in interface IEditEventlineObjectPolicy
model
- the model to which the newly created object will be addedspan
- the time span where the event object gets createdpublic ICommand getChangeTimeSpanCommand(Object eventlineObject, IEventlineModel model, ITimeSpan span)
IEditEventlineObjectPolicy
getChangeTimeSpanCommand
in interface IEditEventlineObjectPolicy
eventlineObject
- the eventline object that gets checked for its editing abilitymodel
- the data source of the eventline objectspan
- the new time span for the eventline objectpublic ICommand getDeleteCommand(Collection<Object> eventlineObjects, IEventlineModel model)
IEditEventlineObjectPolicy
getDeleteCommand
in interface IEditEventlineObjectPolicy
eventlineObjects
- the eventline objects that get deletedmodel
- the data source of the eventline objectpublic ICommand getCreateCommand(IEventlineModel model, ITimeSpan span)
IEditEventlineObjectPolicy
getCreateCommand
in interface IEditEventlineObjectPolicy
model
- the model to which the new object needs to be addedspan
- the time span for the new eventline objectCopyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.