|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.dlsc.flexgantt.policy.AbstractPolicy com.dlsc.flexgantt.policy.layer.DefaultLinePolicy
public class DefaultLinePolicy
The default implementation of the line policy delegates all of its method
invocations to the nodes and timeline objects that get passed to it as
parameters. In order for this to work the nodes need to implement the
IGanttChartNode
interface and the timeline objects need to implement
the ITimelineObject
interface. For more general information on the
purpose of this policy please refer to ILinePolicy
.
IGanttChartNode.getLineCount()
,
IGanttChartNode.getLineHeight(int, int)
,
IGanttChartNode.getLineLocation(int, int)
,
ITimelineObject.getLineIndex()
Constructor Summary | |
---|---|
DefaultLinePolicy()
|
Method Summary | |
---|---|
int |
getLineCount(java.lang.Object node,
ITreeTableModel model)
Returns the number of (inner) lines shown in the row of a hierarchy node. |
int |
getLineHeight(java.lang.Object node,
ITreeTableModel model,
int lineIndex,
int rowHeight)
Returns the height of a specific (inner) line. |
int |
getLineIndex(java.lang.Object node,
ITreeTableModel model,
java.lang.Object timelineObject)
Returns the index of the line on which the given timeline object shall be placed (the indices start with 0). |
int |
getLineLocation(java.lang.Object node,
ITreeTableModel model,
int lineIndex,
int rowHeight)
Returns the y-coordinate of a specific (inner) line. |
boolean |
isLineVisible(java.lang.Object node,
ITreeTableModel model,
int lineIndex)
Determines whether a specific (inner) line is currently visible or not. |
Methods inherited from class com.dlsc.flexgantt.policy.AbstractPolicy |
---|
assertClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultLinePolicy()
Method Detail |
---|
public int getLineCount(java.lang.Object node, ITreeTableModel model)
ILinePolicy
getLineCount
in interface ILinePolicy
node
- the hierarchy node for which to return the total number of
linesmodel
- the tree table model to which the node belongs
public int getLineLocation(java.lang.Object node, ITreeTableModel model, int lineIndex, int rowHeight)
ILinePolicy
getLineLocation
in interface ILinePolicy
node
- the hierarchy node for which to return the total number of
linesmodel
- the tree table model to which the node belongslineIndex
- the index of the line for which to return the y-coordinaterowHeight
- the height of the row to which the line belongs
ILinePolicy.getLineHeight(Object, ITreeTableModel, int, int)
public int getLineHeight(java.lang.Object node, ITreeTableModel model, int lineIndex, int rowHeight)
ILinePolicy
getLineHeight
in interface ILinePolicy
node
- the hierarchy node for which to return the total number of
linesmodel
- the tree table model to which the node belongslineIndex
- the index of the line for which to return the heightrowHeight
- the height of the row to which the line belongs
public int getLineIndex(java.lang.Object node, ITreeTableModel model, java.lang.Object timelineObject)
ILinePolicy
getLineIndex
in interface ILinePolicy
node
- the hierarchy node for which to return the total number of
linesmodel
- the tree table model to which the node belongstimelineObject
- the timeline object for which to return the line index
public boolean isLineVisible(java.lang.Object node, ITreeTableModel model, int lineIndex)
ILinePolicy
isLineVisible
in interface ILinePolicy
node
- the hierarchy node for which to return the total number of
linesmodel
- the tree table model to which the node belongslineIndex
- the index of the line for which to determine the visibility
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |