R
- the type of the rowA
- the type of the activitiespublic class EqualLinesManager<R extends Row<?,?,A>,A extends Activity> extends Object implements LinesManager<A>
Row.getLineCount()
Constructor and Description |
---|
EqualLinesManager(Row<?,?,A> row)
Constructs a new lines manager for the given row.
|
Modifier and Type | Method and Description |
---|---|
double |
getLineHeight(int lineIndex,
double rowHeight)
Returns the height of the line with the given index.
|
int |
getLineIndex(A activity)
Returns the line index for the given activity.
|
Layout |
getLineLayout(int lineIndex)
Returns the layout for the line with the given line index.
|
double |
getLineLocation(int lineIndex,
double rowHeight)
Returns the location of the line with the given index.
|
public EqualLinesManager(Row<?,?,A> row)
Row.lineCountProperty()
and
Row.heightProperty()
in order to recalculate the line locations
and heights.row
- the row for which to use the managerpublic final double getLineLocation(int lineIndex, double rowHeight) throws IllegalLineIndexException
LinesManager
Row.getHeight()
.
Lines are free to overlap each other.getLineLocation
in interface LinesManager<A extends Activity>
lineIndex
- the index of the linerowHeight
- the height of the row where the line is locatedIllegalLineIndexException
- if no line with the given index existspublic Layout getLineLayout(int lineIndex) throws IllegalLineIndexException
LinesManager
getLineLayout
in interface LinesManager<A extends Activity>
lineIndex
- the index of the lineIllegalLineIndexException
- if no line with the given index existspublic final double getLineHeight(int lineIndex, double rowHeight) throws IllegalLineIndexException
LinesManager
Row.getHeight()
.getLineHeight
in interface LinesManager<A extends Activity>
lineIndex
- the index of the linerowHeight
- the height of the row where the line is locatedIllegalLineIndexException
- if no line with the given index existspublic int getLineIndex(A activity)
LinesManager
getLineIndex
in interface LinesManager<A extends Activity>
activity
- the activity for which a line index is requestedCopyright © 2014 Dirk Lemmermann Software & Consulting. All rights reserved.