Class GanttRowClustered<R,B>

java.lang.Object
overit.geocallapp.utilities.ux.ui.container.gantt.data.GanttRow<R,B>
overit.geocallapp.utilities.ux.ui.container.gantt.data.GanttRowClustered<R,B>
All Implemented Interfaces:
Serializable, Iterable<GanttBlock<B>>

public class GanttRowClustered<R,B> extends GanttRow<R,B>
Extension of GanttRow that holds also a list of GanttBlockCluster to group the overlapped GanttBlock
See Also:
  • Constructor Details

    • GanttRowClustered

      public GanttRowClustered()
  • Method Details

    • addBlock

      public void addBlock(GanttBlock<B> block)
      Add the block to the row, and then add the given block to the cluster that overlaps it, if exists. Otherwise, create a new cluster for this new block
      Overrides:
      addBlock in class GanttRow<R,B>
      Parameters:
      block - the GanttBlock to add to this row
    • getCluster

      public GanttBlockCluster<B> getCluster(String id)
      Parameters:
      id - the id of the cluster
      Returns:
      the required GanttBlockCluster.
      Throws:
      overit.geocall.asserts.AssertsException - if the the row doesn't have a cluster with the required id.
    • getClusters

      public List<GanttBlockCluster<B>> getClusters()
      Returns:
      an unmodifiable list with the generated clusters in this row
    • countBlocks

      public int countBlocks()
      Override the count of the GanttRow to have the actual number of blocks, summing the blocks that each cluster holds
      Overrides:
      countBlocks in class GanttRow<R,B>
      Returns:
      the number of blocks in this row