public class DefaultLinePolicy extends AbstractPolicy implements ILinePolicy
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 and Description |
---|
DefaultLinePolicy() |
Modifier and Type | Method and Description |
---|---|
int |
getLineCount(Object node,
ITreeTableModel model)
Returns the number of (inner) lines shown in the row of a hierarchy node.
|
int |
getLineHeight(Object node,
ITreeTableModel model,
int lineIndex,
int rowHeight)
Returns the height of a specific (inner) line.
|
int |
getLineIndex(Object node,
ITreeTableModel model,
Object timelineObject)
Returns the index of the line on which the given timeline object shall be
placed (the indices start with 0).
|
int |
getLineLocation(Object node,
ITreeTableModel model,
int lineIndex,
int rowHeight)
Returns the y-coordinate of a specific (inner) line.
|
boolean |
isLineVisible(Object node,
ITreeTableModel model,
int lineIndex)
Determines whether a specific (inner) line is currently visible or not.
|
assertClass
public int getLineCount(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 belongspublic int getLineLocation(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 belongsILinePolicy.getLineHeight(Object, ITreeTableModel, int, int)
public int getLineHeight(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 belongspublic int getLineIndex(Object node, ITreeTableModel model, 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 indexpublic boolean isLineVisible(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 visibilityCopyright © 2006–2016 Dirk Lemmermann Software & Consulting. All rights reserved.