|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.dlsc.flexgantt.policy.AbstractPolicy com.dlsc.flexgantt.policy.layer.DefaultEditTimelineObjectPolicy
public class DefaultEditTimelineObjectPolicy
The default implmementation of the edit policy for timeline objects. For a
general description of this policy please refer to the policy interface
IEditTimelineObjectPolicy
.
Constructor Summary | |
---|---|
DefaultEditTimelineObjectPolicy()
|
Method Summary | |
---|---|
ICommand |
getChangeTimeSpanCommand(java.lang.Object node,
java.lang.Object timelineObject,
IGanttChartModel model,
ILayer layer,
ITimeSpan span,
int dropAction)
Returns a command object that will perform the actual change of the timeline object's time span. |
ICommand |
getCreateCommand(java.lang.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(java.lang.Object node,
ILayer layer,
java.lang.Object timelineObject,
IGanttChartModel model)
Returns a command object that will perform the deletion of the timeline object. |
boolean |
isCreatable(java.lang.Object node,
IGanttChartModel model,
ITimeSpan span)
Decides whether the timeline object may be deleted. |
boolean |
isDeletable(java.lang.Object node,
java.lang.Object timelineObject,
IGanttChartModel model)
Decides whether the timeline object may be deleted. |
boolean |
isDurationChangeable(java.lang.Object node,
java.lang.Object timelineObject,
IGanttChartModel model)
Decides whether the duration of a timeline object may be edited / changed. |
boolean |
isInPlaceEditable(java.lang.Object node,
java.lang.Object timelineObject,
IGanttChartModel model)
Decides whether a timeline object can be edited with an editor where the editor is usually an instance of ITimelineObjectEditor . |
boolean |
isStartTimeChangeable(java.lang.Object node,
java.lang.Object timelineObject,
IGanttChartModel model)
Decides whether the start time of a timeline object may be edited / changed. |
Methods inherited from class com.dlsc.flexgantt.policy.AbstractPolicy |
---|
assertClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultEditTimelineObjectPolicy()
Method Detail |
---|
public boolean isInPlaceEditable(java.lang.Object node, java.lang.Object timelineObject, IGanttChartModel model)
IEditTimelineObjectPolicy
ITimelineObjectEditor
.
isInPlaceEditable
in interface IEditTimelineObjectPolicy
node
- the tree node that owns the timeline objecttimelineObject
- the timeline object that gets checked for its editing abilitymodel
- the data source of the tree node and the timeline object
public boolean isStartTimeChangeable(java.lang.Object node, java.lang.Object timelineObject, IGanttChartModel model)
IEditTimelineObjectPolicy
isStartTimeChangeable
in interface IEditTimelineObjectPolicy
node
- the tree node that owns the timeline objecttimelineObject
- the timeline object that gets checked for its time span
editing abilitymodel
- the data source of the tree node and the timeline object
public boolean isDurationChangeable(java.lang.Object node, java.lang.Object timelineObject, IGanttChartModel model)
IEditTimelineObjectPolicy
isDurationChangeable
in interface IEditTimelineObjectPolicy
node
- the tree node that owns the timeline objecttimelineObject
- the timeline object that gets checked for its time span
editing abilitymodel
- the data source of the tree node and the timeline object
public boolean isCreatable(java.lang.Object node, IGanttChartModel model, ITimeSpan span)
IEditTimelineObjectPolicy
isCreatable
in interface IEditTimelineObjectPolicy
node
- the tree node that will own the new timeline objectmodel
- the data source of the timeline objectspan
- the time span where the new timeline object shall be created
public boolean isDeletable(java.lang.Object node, java.lang.Object timelineObject, IGanttChartModel model)
IEditTimelineObjectPolicy
isDeletable
in interface IEditTimelineObjectPolicy
node
- the tree node that owns the timeline objecttimelineObject
- the eventline object that gets checkedmodel
- the data source of the timeline object
public ICommand getChangeTimeSpanCommand(java.lang.Object node, java.lang.Object timelineObject, IGanttChartModel model, ILayer layer, ITimeSpan span, int dropAction)
IEditTimelineObjectPolicy
getChangeTimeSpanCommand
in interface IEditTimelineObjectPolicy
node
- the tree node that owns the timeline objecttimelineObject
- the timeline object that receives a new time spanmodel
- the data source of the tree node and the timeline objectlayer
- the layer on which the timeline object is locatedspan
- 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 getCreateCommand(java.lang.Object node, IGanttChartModel model, ILayer layer, ITimeSpan span, int lineIndex)
IEditTimelineObjectPolicy
getCreateCommand
in interface IEditTimelineObjectPolicy
node
- 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(java.lang.Object node, ILayer layer, java.lang.Object timelineObject, IGanttChartModel model)
IEditTimelineObjectPolicy
getDeleteCommand
in interface IEditTimelineObjectPolicy
node
- the tree node that owns the timeline objectlayer
- the layer on which the timeline object is displayedtimelineObject
- the timeline object that gets deletedmodel
- the data source of the tree node and the timeline object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |