public class DefaultEditTimelineObjectPolicy extends AbstractPolicy implements IEditTimelineObjectPolicy
IEditTimelineObjectPolicy.| Constructor and Description |
|---|
DefaultEditTimelineObjectPolicy() |
| Modifier and Type | Method and Description |
|---|---|
ICommand |
getChangeTimeSpanCommand(TimelineObjectPath path,
IGanttChartModel model,
ITimeSpan span,
int dropAction)
Returns a command object that will perform the actual change of the
timeline object's time span.
|
ICommand |
getChangeTimeSpansCommand(IGanttChartModel model,
List<TimelineObjectPath> timelineObjects,
List<ITimeSpan> timeSpans,
int dropAction)
Returns a command object that will perform the actual change of the
timeline objects' time spans.
|
ICommand |
getCreateCommand(Object node,
IGanttChartModel model,
ILayer layer,
ITimeSpan span,
int lineIndex)
Returns a command object that will perform the creation of a new timeline
object.
|
ICommand |
getDeleteCommand(IGanttChartModel model,
Collection<TimelineObjectPath> timelineObjects)
Returns a command object that will perform the deletion of the given
timeline objects.
|
boolean |
isCreatable(Object node,
IGanttChartModel model,
ILayer layer,
ITimeSpan span)
Decides whether a timeline object can be created for the given node,
model, and time span.
|
boolean |
isDeletable(TimelineObjectPath path,
IGanttChartModel model)
Decides whether the timeline object may be deleted.
|
boolean |
isDurationChangeable(TimelineObjectPath path,
IGanttChartModel model)
Decides whether the duration of a timeline object may be edited /
changed.
|
boolean |
isInPlaceEditable(TimelineObjectPath path,
IGanttChartModel model)
Decides whether a timeline object can be edited with an editor where the
editor is usually an instance of
ITimelineObjectEditor. |
boolean |
isStartTimeChangeable(TimelineObjectPath path,
IGanttChartModel model)
Decides whether the start time of a timeline object may be edited /
changed.
|
assertClasspublic boolean isInPlaceEditable(TimelineObjectPath path, IGanttChartModel model)
IEditTimelineObjectPolicyITimelineObjectEditor.isInPlaceEditable in interface IEditTimelineObjectPolicypath - the path to the timeline object that gets checked for its
editing abilitymodel - the model to which the timeline object belongspublic boolean isStartTimeChangeable(TimelineObjectPath path, IGanttChartModel model)
IEditTimelineObjectPolicyisStartTimeChangeable in interface IEditTimelineObjectPolicypath - the path to the timeline object that gets checked for its time
span editing abilitymodel - the model to which the timeline object belongspublic boolean isDurationChangeable(TimelineObjectPath path, IGanttChartModel model)
IEditTimelineObjectPolicyisDurationChangeable in interface IEditTimelineObjectPolicypath - the path to the timeline object that gets checked for its time
span editing abilitymodel - the model to which the timeline object belongspublic boolean isCreatable(Object node, IGanttChartModel model, ILayer layer, ITimeSpan span)
IEditTimelineObjectPolicyisCreatable in interface IEditTimelineObjectPolicynode - the tree node that will own the new timeline objectmodel - the model to which the timeline object will be addedlayer - the layer where the timeline object will be addedspan - the time span where the new timeline object shall be createdpublic boolean isDeletable(TimelineObjectPath path, IGanttChartModel model)
IEditTimelineObjectPolicyisDeletable in interface IEditTimelineObjectPolicypath - the path to the timeline object that gets checkedmodel - the model to which the timeline object belongspublic ICommand getChangeTimeSpanCommand(TimelineObjectPath path, IGanttChartModel model, ITimeSpan span, int dropAction)
IEditTimelineObjectPolicygetChangeTimeSpanCommand in interface IEditTimelineObjectPolicypath - the path to the timeline object that receives a new time spanmodel - the data source of the tree node and the timeline objectspan - the new time span for the timeline objectdropAction - the type of drag that was executed by the user (COPY or MOVE,
the possible values are listed in DnDConstants).public ICommand getChangeTimeSpansCommand(IGanttChartModel model, List<TimelineObjectPath> timelineObjects, List<ITimeSpan> timeSpans, int dropAction)
IEditTimelineObjectPolicygetChangeTimeSpansCommand in interface IEditTimelineObjectPolicymodel - the data source of the tree node and the timeline objecttimelineObjects - the timeline objects that receives the new time spantimeSpans - the new time spans for the timeline objectsdropAction - the type of drag that was executed by the user (COPY or MOVE,
the possible values are listed in DnDConstants).public ICommand getCreateCommand(Object node, IGanttChartModel model, ILayer layer, ITimeSpan span, int lineIndex)
IEditTimelineObjectPolicygetCreateCommand in interface IEditTimelineObjectPolicynode - the tree node that will own the new timeline objectmodel - the data source of the tree nodelayer - the layer to which the newly created timeline object will be
addedspan - the time span where the new timeline object will be placedlineIndex - the index of the line (see ILinePolicy) where the new
timeline object gets created (-1 if no specific inner line is
used)public ICommand getDeleteCommand(IGanttChartModel model, Collection<TimelineObjectPath> timelineObjects)
IEditTimelineObjectPolicygetDeleteCommand in interface IEditTimelineObjectPolicymodel - the data source of the tree node and the timeline objecttimelineObjects - the timeline objects that gets deletedCopyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.