com.dlsc.flexgantt.policy.layer
Class TimeGranularityDragInfoPolicy
java.lang.Object
com.dlsc.flexgantt.policy.AbstractPolicy
com.dlsc.flexgantt.policy.layer.DefaultDragInfoPolicy
com.dlsc.flexgantt.policy.layer.TimeGranularityDragInfoPolicy
- All Implemented Interfaces:
- IPolicy, IDragInfoPolicy
public class TimeGranularityDragInfoPolicy
- extends DefaultDragInfoPolicy
A drag info policy that is being used when the currently used dateline model
is an instance of TimeGranularityDatelineModel
.
- Since:
- 1.0
- Author:
- Dirk Lemmermann
Method Summary |
java.text.DateFormat |
getDateFormat()
Returns the date formatting object used by the policy to create nicely
formatted date strings for the date info. |
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). |
void |
setDateFormat(java.text.DateFormat format)
Sets the date formatting object used by the policy to create nicely
formatted date strings for the date info. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimeGranularityDragInfoPolicy
public TimeGranularityDragInfoPolicy()
getDragInfo
public java.lang.Object getDragInfo(java.lang.Object node,
java.lang.Object timelineObject,
IGanttChartModel model,
java.lang.Object dropNode,
ITimeSpan dropSpan)
- Description copied from interface:
IDragInfoPolicy
- 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.
- Specified by:
getDragInfo
in interface IDragInfoPolicy
- Overrides:
getDragInfo
in class DefaultDragInfoPolicy
- Parameters:
node
- the tree node that owns the timeline objecttimelineObject
- the dragged objectmodel
- the model to which the dragged timeline object belongsdropNode
- the tree node over which the dragged object hoversdropSpan
- the span over which the dragged object hovers
- Returns:
- an arbitrary object that can contain information relevant for a
drag info renderer
getDateFormat
public java.text.DateFormat getDateFormat()
- Returns the date formatting object used by the policy to create nicely
formatted date strings for the date info.
- Returns:
- the date formatter used by the policy
- Since:
- 1.0
setDateFormat
public void setDateFormat(java.text.DateFormat format)
- Sets the date formatting object used by the policy to create nicely
formatted date strings for the date info.
- Parameters:
format
- the date formatter used by the policy- Since:
- 1.0