public class DefaultCrosshairPolicy extends AbstractPolicy implements ICrosshairPolicy
ICrosshairPolicy
.ICrosshairPolicy.LabelPosition
Constructor and Description |
---|
DefaultCrosshairPolicy() |
Modifier and Type | Method and Description |
---|---|
String |
getLabel(Object node,
TimelineObjectPath path,
IGanttChartModel model,
long time,
ICrosshairPolicy.LabelPosition position)
Returns a label that will be shown to the left/right and top/bottom of
the crosshair location.
|
DateFormat |
getTimelineDateFormat()
Returns the date formatting object used for formatting the date at the
current crosshair cursor location.
|
DateFormat |
getTimelineObjectDateFormat()
Returns the date formatting object used for formatting the date
information provided by the timeline object over which the crosshair
cursor is hovering
|
boolean |
isLabelVisible(ICrosshairPolicy.LabelPosition position)
Determines whether a label is visible at all.
|
void |
setTimelineDateFormat(DateFormat format)
Sets the date formatting object used for formatting the date at the
current crosshair cursor location.
|
void |
setTimelineObjectDateFormat(DateFormat format)
Sets the date formatting object used for formatting the date information
provided by the timeline object over which the crosshair cursor is
hovering
|
assertClass
public String getLabel(Object node, TimelineObjectPath path, IGanttChartModel model, long time, ICrosshairPolicy.LabelPosition position)
ICrosshairPolicy
getLabel
in interface ICrosshairPolicy
node
- the tree node to the left of the crosshair cursor (might be
NULL if the crosshair is below the last row)path
- the timeline object over which the crosshair is currently
hovering (might be NULL if the crosshair is not on top of an
object)model
- the data source of the tree node and timeline objecttime
- the time at the current location of the crosshairposition
- the position where the label will be placedpublic boolean isLabelVisible(ICrosshairPolicy.LabelPosition position)
ICrosshairPolicy
isLabelVisible
in interface ICrosshairPolicy
position
- the positon to check for visibilitypublic DateFormat getTimelineDateFormat()
public void setTimelineDateFormat(DateFormat format)
format
- the date formatter used for displaying the dateline timepublic DateFormat getTimelineObjectDateFormat()
public void setTimelineObjectDateFormat(DateFormat format)
format
- the date formatter used for displaying the timeline object
timeCopyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.