com.dlsc.flexgantt.policy.layer
Interface IDragInfoPolicy

All Superinterfaces:
IPolicy
All Known Implementing Classes:
DefaultDragInfoPolicy, TimeGranularityDragInfoPolicy

public interface IDragInfoPolicy
extends IPolicy

A policy used by the drag layer to display information to the user about the current drag location (which is a possible drop candidate).

Since:
1.0
Author:
Dirk Lemmermann

Method Summary
 java.lang.Object getDragInfo(java.lang.Object node, java.lang.Object timelineObject, IGanttChartModel model, int rowHeight, int y, double capacityUsed)
          Returns an object that can be used to show information while the user interactively changes the capacity used value.
 java.lang.Object getDragInfo(java.lang.Object node, java.lang.Object timelineObject, IGanttChartModel model, long timePoint, double percentageComplete)
          Returns an object that can be used to show information while the user interactively changes the percentage complete value.
 java.lang.Object getDragInfo(java.lang.Object node, java.lang.Object timelineObject, IGanttChartModel model, java.lang.Object dropNode, ITimeSpan dropSpan)
          Returns an object that can be used to show information during a drag operation (e.g. time span over which the dragged timeline object hovers).
 

Method Detail

getDragInfo

java.lang.Object getDragInfo(java.lang.Object node,
                             java.lang.Object timelineObject,
                             IGanttChartModel model,
                             java.lang.Object dropNode,
                             ITimeSpan dropSpan)
Returns an object that can be used to show information during a drag operation (e.g. time span over which the dragged timeline object hovers). The default implementation returns the timeline object itself.

Parameters:
node - the tree node that owns the timeline object
timelineObject - the dragged object
model - the model to which the dragged timeline object belongs
dropNode - the tree node over which the dragged object hovers
dropSpan - the span over which the dragged object hovers
Returns:
an arbitrary object that can contain information relevant for a drag info renderer
Since:
1.0

getDragInfo

java.lang.Object getDragInfo(java.lang.Object node,
                             java.lang.Object timelineObject,
                             IGanttChartModel model,
                             long timePoint,
                             double percentageComplete)
Returns an object that can be used to show information while the user interactively changes the percentage complete value.

Parameters:
node - the tree node that owns the timeline object
timelineObject - the dragged object
model - the model to which the dragged timeline object belongs
timePoint - the current (grid adjusted) time at the cursor location
percentageComplete - the percentage complete value of the activity object
Returns:
an arbitrary object that can contain information relevant for a drag info renderer
Since:
1.0

getDragInfo

java.lang.Object getDragInfo(java.lang.Object node,
                             java.lang.Object timelineObject,
                             IGanttChartModel model,
                             int rowHeight,
                             int y,
                             double capacityUsed)
Returns an object that can be used to show information while the user interactively changes the capacity used value.

Parameters:
node - the tree node that owns the timeline object
timelineObject - the dragged object
model - the model to which the dragged timeline object belongs
rowHeight - the height of the row in which the drag operation takes place
y - the current y coordinate relative to the coordinate system of the row (0 = bottom of row)
capacityUsed - the capacity used value of the capacity object
Returns:
an arbitrary object that can contain information relevant for a drag info renderer
Since:
1.0