Interface LinesManager<A extends Activity>

Type Parameters:
A - the type of the activities that will be shown on the lines
All Known Implementing Classes:
AutoLinesManager, EqualLinesManager, LinesManagerBase

public interface LinesManager<A extends Activity>
A lines manager is used to control the layout of lines inside a row. Activities located on different lines do not overlap each other, except if the lines themselves overlap each other. Each line can have its own height and a location within the row. Each line can also have its own Layout . By using lines and layouts it is possible to display activities that belong to the same row in different ways (see ChartLayout, AgendaLayout, GanttLayout).
Since:
1.0
  • Method Summary

    Modifier and Type
    Method
    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.
    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.
  • Method Details

    • getLineIndex

      int getLineIndex(A activity)
      Returns the line index for the given activity. This method is responsible for placing activities on different lines.
      Parameters:
      activity - the activity for which a line index is requested
      Returns:
      the line index of the given activity
      Since:
      1.0
    • getLineLocation

      double getLineLocation(int lineIndex, double rowHeight)
      Returns the location of the line with the given index. In most cases the value of the location is somewhere between 0 and Row.getHeight(). Lines are free to overlap each other.
      Parameters:
      lineIndex - the index of the line
      rowHeight - the height of the row where the line is located
      Returns:
      the location of the given line (y-coordinate)
      Throws:
      IllegalLineIndexException - if no line with the given index exists
      Since:
      1.0
    • getLineHeight

      double getLineHeight(int lineIndex, double rowHeight)
      Returns the height of the line with the given index. In most cases the height is somewhere between 0 and Row.getHeight().
      Parameters:
      lineIndex - the index of the line
      rowHeight - the height of the row where the line is located
      Returns:
      the height of the given line
      Throws:
      IllegalLineIndexException - if no line with the given index exists
      Since:
      1.0
    • getLineLayout

      Layout getLineLayout(int lineIndex)
      Returns the layout for the line with the given line index. A row and each line within a row can have their own layout.
      Parameters:
      lineIndex - the index of the line
      Returns:
      the layout of the given line
      Throws:
      IllegalLineIndexException - if no line with the given index exists
      Since:
      1.0