|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDragAndDropPolicy
A policy used in the context of drag & drop operations related to timeline objects. The policy determines which objects can be dragged and where they can be dropped. Additionally it provides the command objects that will perform the actual drag & drop (removing the timeline object from one node and adding it to another if the user attempts a reassignment, changing the time span if the user attempts a simple move).
DefaultDragAndDropCommand
Method Summary | |
---|---|
int |
getDragActions(java.lang.Object node,
java.lang.Object timelineObject,
IGanttChartModel model)
Determines how the given timeline object can be dragged (copy, move, copy or move, none). |
ICommand |
getDragAndDropCommand(java.lang.Object node,
java.lang.Object droppedTimelineObject,
IGanttChartModel model,
java.lang.Object newNode,
IGanttChartModel newModel,
long newStartTime,
java.lang.Object[] timelineObjects,
ILayer layer,
int dropAction)
Returns a command object that will be used to make the necessary modifications to the models when the user dragged several timeline objects from one row to another at the same time. |
int |
getDropActions(java.lang.Object node,
java.lang.Object timelineObject,
IGanttChartModel model,
java.lang.Object newNode,
IGanttChartModel newModel,
long newStartTime)
Determines whether the new location as specified by the new tree node, new model and new time span can be used as a drop location for the given timeline object. |
Method Detail |
---|
int getDragActions(java.lang.Object node, java.lang.Object timelineObject, IGanttChartModel model)
DnDConstants
class.
node
- the tree node that owns the timeline objecttimelineObject
- the timeline object that has to participate in a drag and drop
operationmodel
- the data source of the tree node and the timeline object
int getDropActions(java.lang.Object node, java.lang.Object timelineObject, IGanttChartModel model, java.lang.Object newNode, IGanttChartModel newModel, long newStartTime)
node
- the tree node that owns the timeline objecttimelineObject
- the timeline object that has to participate in a drag and drop
operationmodel
- the data source of the tree node and the timeline objectnewNode
- the tree node that will be the new owner of the timeline
objectnewModel
- the data source of the new tree node ownernewStartTime
- the time point that will be the new start time of the timeline
object
DnDConstants
ICommand getDragAndDropCommand(java.lang.Object node, java.lang.Object droppedTimelineObject, IGanttChartModel model, java.lang.Object newNode, IGanttChartModel newModel, long newStartTime, java.lang.Object[] timelineObjects, ILayer layer, int dropAction)
node
- the tree node that owns the timeline objectsdroppedTimelineObject
- the timeline object that was dragged and droppedmodel
- the data source of the tree node and the timeline objectsnewNode
- the tree node that will be the new owner of the timeline
objectsnewModel
- the data source of the new tree node ownernewStartTime
- the time point that will be the new start time of the timeline
objecttimelineObjects
- the timeline objects that might have to participate in a drag
and drop operation because they were selected at the same timelayer
- the layer on which the drag and drop operation takes placedropAction
- an value used to distinguish between different types of drop
operations (possible values listed in DnDConstants
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |