public class DefaultDragInfoPolicy extends AbstractPolicy implements IDragInfoPolicy
SimpleGranularityDatelineModel
is in
use.Constructor and Description |
---|
DefaultDragInfoPolicy() |
Modifier and Type | Method and Description |
---|---|
NumberFormat |
getCapacityFormatter()
Returns the formatter that is being used to format the capacity used
value into a nice text.
|
Object |
getDragInfo(TimelineObjectPath path,
IGanttChartModel model,
IDatelineModel<?> datelineModel,
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).
|
Object |
getDragInfo(TimelineObjectPath path,
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.
|
Object |
getDragInfo(TimelineObjectPath path,
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.
|
NumberFormat |
getPercentageFormatter()
Returns the formatter that is being used to format the percentage
complete value into a nice text.
|
void |
setCapacityFormatter(NumberFormat formatter)
Sets the formatter that is being used to format the percentage complete
value into a nice text.
|
void |
setPercentageFormatter(NumberFormat formatter)
Sets the formatter that is being used to format the percentage complete
value into a nice text.
|
assertClass
public Object getDragInfo(TimelineObjectPath path, IGanttChartModel model, IDatelineModel<?> datelineModel, Object dropNode, ITimeSpan dropSpan)
IDragInfoPolicy
getDragInfo
in interface IDragInfoPolicy
path
- the path to the dragged timeline objectmodel
- the model to which the dragged timeline object belongsdatelineModel
- the model used by the datelinedropNode
- the tree node over which the dragged object hoversdropSpan
- the span over which the dragged object hoverspublic Object getDragInfo(TimelineObjectPath path, IGanttChartModel model, long timePoint, double percentageComplete)
IDragInfoPolicy
getDragInfo
in interface IDragInfoPolicy
path
- the path to the dragged timeline objectmodel
- the model to which the dragged timeline object belongstimePoint
- the current (grid adjusted) time at the cursor locationpercentageComplete
- the percentage complete value of the activity objectpublic Object getDragInfo(TimelineObjectPath path, IGanttChartModel model, int rowHeight, int y, double capacityUsed)
IDragInfoPolicy
getDragInfo
in interface IDragInfoPolicy
path
- the path to the dragged objectmodel
- the model to which the dragged timeline object belongsrowHeight
- the height of the row in which the drag operation takes placey
- the current y coordinate relative to the coordinate system of
the row (0 = bottom of row)capacityUsed
- the capacity used value of the capacity objectpublic NumberFormat getPercentageFormatter()
getDragInfo(TimelineObjectPath, IGanttChartModel, int, int, double)
public void setPercentageFormatter(NumberFormat formatter)
formatter
- the formatter for the percentage complete textgetDragInfo(TimelineObjectPath, IGanttChartModel, long, double)
public NumberFormat getCapacityFormatter()
getDragInfo(TimelineObjectPath, IGanttChartModel, int, int, double)
public void setCapacityFormatter(NumberFormat formatter)
formatter
- the formatter for the percentage complete textgetDragInfo(TimelineObjectPath, IGanttChartModel, int, int, double)
Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.