Interface GanttDataReader<R,B>

All Superinterfaces:
Serializable
All Known Implementing Classes:
GanttTestDataReader

public interface GanttDataReader<R,B> extends Serializable
Interface to define what must be able to do a GanttDataReader. The main assumption is that the starting point is an HashGetter with the data of a single Gantt block. That data must include also information about the row that own the block, and also the information about the parent know. In other terms, the HashGetter is the join of the row and block data.
  • Method Details

    • getRowId

      String getRowId(R data)
      Parameters:
      data - the T with the data of row and block
      Returns:
      the id of the row that holds the block
    • getRowDescrition

      String getRowDescrition(R data)
      Parameters:
      data - the T with the data of row and block
      Returns:
      the description of the row that holds the block
    • getParentRowId

      String getParentRowId(R data)
      Parameters:
      data - the T with the data of row and block
      Returns:
      the id of the parent row (if exists), null otherwise.
    • getRowTooltipItems

      Map<String,String> getRowTooltipItems(R data)
      Parameters:
      data - the T with the data of row and block
      Returns:
      a Map label - value with the basic tool-tip for the row. The label will be managed via Teacher.adjust so, add the '=' to say if the label must be translation in the user language.
    • getBlockId

      String getBlockId(B data)
      Parameters:
      data - the T with the data of row and block
      Returns:
      the id the Gantt block.
    • getBlockBeginDate

      Date getBlockBeginDate(B data)
      Parameters:
      data - the T with the data of row and block
      Returns:
      the begin date the Gantt block.
    • getBlockEndDate

      Date getBlockEndDate(B data)
      Parameters:
      data - the T with the data of row and block
      Returns:
      the end date the Gantt block.
    • getBlockDescritpin

      String getBlockDescritpin(B data)
      Parameters:
      data - the T with the data of row and block
      Returns:
      the description the Gantt block.
    • getBlockColor

      String getBlockColor(B data)
      Parameters:
      data - the T with the data of row and block
      Returns:
      the color to set to the Gantt block.
    • getBlockPriority

      Long getBlockPriority(B data)
      Parameters:
      data - the T with the data of row and block
      Returns:
      the priority value of the block, used to determine a render order.
    • getBlockTooltipItems

      Map<String,String> getBlockTooltipItems(B data)
      Parameters:
      data - the T with the data of row and block
      Returns:
      a Map label - value with the basic tool-tip for the row. The label will be managed via Teacher.adjust so, add the '=' to say if the label must be translation in the user language.
    • buildRowData

      R buildRowData(HashGetter rawData)
      Parameters:
      rawData - the raw data record
      Returns:
      an instance of R to pass to relative GanttRow
    • buildBlockData

      B buildBlockData(HashGetter rawData)
      Parameters:
      rawData - the raw data record
      Returns:
      an instance of B to pass to the relative GanttBlock