R
- the type of the row that will be managedA
- the type of the activities that will be managedpublic class AutoLinesManager<R extends Row<?,?,A>,A extends Activity> extends EqualLinesManager<R,A>
LinesManager
used for ensuring that activities will not
overlap each other. This manager will create as many inner lines as needed
and will calculate the placement of all activities on these lines.Constructor and Description |
---|
AutoLinesManager(R row,
GraphicsBase<R> graphics)
Constructs a new automatic lines manager.
|
Modifier and Type | Method and Description |
---|---|
GraphicsBase<R> |
getGraphics()
Returns the graphics view where the manager will be used.
|
int |
getLineIndex(A activity)
Returns the line index for the given activity.
|
void |
layout()
Triggers a layout of the activities and calculates the line count for the
row.
|
void |
setFilter(Predicate<A> filter)
Sets a filter that will be used in combination with a
Resolver
instance to figure out which activities are relevant for the calculation
of overlapping activities (clusters). |
getLineHeight, getLineLayout, getLineLocation, getRow
public AutoLinesManager(R row, GraphicsBase<R> graphics)
row
- the managed rowgraphics
- the graphics view where the manager will be usedpublic final GraphicsBase<R> getGraphics()
public final void setFilter(Predicate<A> filter)
Resolver
instance to figure out which activities are relevant for the calculation
of overlapping activities (clusters). If the predicate returns false then
the activity will not be considered when creating the clusters.filter
- the filterpublic final void layout()
public final int getLineIndex(A activity)
LinesManager
getLineIndex
in interface LinesManager<A extends Activity>
getLineIndex
in class EqualLinesManager<R extends Row<?,?,A>,A extends Activity>
activity
- the activity for which a line index is requestedCopyright © 2020 Dirk Lemmermann Software & Consulting. All rights reserved.