com.dlsc.flexgantt.policy.layer
Interface ICrosshairPolicy

All Superinterfaces:
IPolicy
All Known Implementing Classes:
DefaultCrosshairPolicy

public interface ICrosshairPolicy
extends IPolicy

A policy used for the crosshair feature. The policy provides labels for the four corners around the crosshair circle.

Since:
1.0
Author:
Dirk Lemmermann

Nested Class Summary
static class ICrosshairPolicy.LabelPosition
           
 
Method Summary
 java.lang.String getLabel(java.lang.Object node, java.lang.Object timelineObject, 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.
 boolean isLabelVisible(ICrosshairPolicy.LabelPosition position)
          Determines whether a label is visible at all.
 

Method Detail

isLabelVisible

boolean isLabelVisible(ICrosshairPolicy.LabelPosition position)
Determines whether a label is visible at all.

Parameters:
position - the positon to check for visibility
Returns:
TRUE if the label should be shown to the user
Since:
1.0

getLabel

java.lang.String getLabel(java.lang.Object node,
                          java.lang.Object timelineObject,
                          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. These labels could also be called label decorators of the crosshair.

Parameters:
node - the tree node to the left of the crosshair cursor (might be NULL if the crosshair is below the last row)
timelineObject - 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 object
time - the time at the current location of the crosshair
position - the position where the label will be placed
Returns:
a label to be shown next to the crosshair circle
Since:
1.0