java.lang.Object
overit.geocallapp.utilities.ux.ui.container.gantt.data.GanttBlock<T>
All Implemented Interfaces:
Serializable, Comparable<GanttBlock<T>>
Direct Known Subclasses:
ForecastActivityDetailGanttBlock

public class GanttBlock<T> extends Object implements Comparable<GanttBlock<T>>, Serializable
Class to store the information of a block in the GanttRow. The natural order of a GanttBlock is priority descendant, and begin date ascendant
See Also:
  • Field Details

  • Constructor Details

    • GanttBlock

      public GanttBlock()
  • Method Details

    • getRow

      public GanttRow<?,T> getRow()
    • setRow

      public void setRow(GanttRow<?,T> row)
    • setId

      public void setId(String id)
      Parameters:
      id - the id of this block
    • getId

      public String getId()
      Returns:
      the id of this block
    • setDescription

      public void setDescription(String description)
      Parameters:
      description - the description of this block
    • getDescription

      public String getDescription()
      Returns:
      the description of this block
    • setTooltipItems

      public void setTooltipItems(Map<String,String> tooltipItems)
    • getTooltipItems

      public Map<String,String> getTooltipItems()
      Returns:
      the Map label - value with the basic tool-tip for the row. The label will be managed via Teacher.adjust so, add the '=' to say whether the label must be translation in the user language.
    • setColor

      public void setColor(String color)
      Parameters:
      color - the block color
    • getColor

      public String getColor()
      Returns:
      the block color
    • setBegin

      public void setBegin(Date begin)
      Parameters:
      begin - the begin date of this block
    • getBegin

      public Date getBegin()
      Returns:
      the begin date of this block
    • setEnd

      public void setEnd(Date end)
      Parameters:
      end - the end date of this block
    • getEnd

      public Date getEnd()
      Returns:
      the end date of this block
    • getExpectedBegin

      public Date getExpectedBegin()
    • setExpectedBegin

      public void setExpectedBegin(Date expectedBegin)
    • getExpectedEnd

      public Date getExpectedEnd()
    • setExpectedEnd

      public void setExpectedEnd(Date expectedEnd)
    • getActualBegin

      public Date getActualBegin()
    • setActualBegin

      public void setActualBegin(Date actualBegin)
    • getActualEnd

      public Date getActualEnd()
    • setActualEnd

      public void setActualEnd(Date actualEnd)
    • setPriority

      public void setPriority(Long priority)
      Parameters:
      priority - the priority of this block, used to determine a render order
    • getPriority

      public Long getPriority()
      Returns:
      the priority the priority of this block, used to determine a render order
    • setRawData

      public void setRawData(T rawData)
      Parameters:
      rawData - the raw data that holds this block
    • getRawData

      public T getRawData()
      Returns:
      the raw data that holds this block
    • addLink

      public void addLink(GanttBlockLink<T> link)
    • getType

      public GanttBlock.GanttBlockType getType()
      Returns:
      the GanttBlock.GanttBlockType of this block
    • setType

      public void setType(GanttBlock.GanttBlockType type)
      Parameters:
      type - the GanttBlock.GanttBlockType of this block
    • getLinks

      public List<GanttBlockLink<T>> getLinks()
    • getProgress

      public double getProgress()
      Returns:
      the percentage value of progress of this block
    • setProgress

      public void setProgress(double progress)
      Parameters:
      progress - the percentage value of progress of this block
    • getIndicators

      public List<GanttBlockIndicator> getIndicators()
      Returns:
      the indicators configured for this block
    • addIndicator

      public void addIndicator(GanttBlockIndicator indicator)
      Parameters:
      indicator - the indicator to add
    • removeIndicator

      public void removeIndicator(GanttBlockIndicator indicator)
      Parameters:
      indicator - the indicator to remove
    • getGradient

      public Boolean getGradient()
    • setGradient

      public void setGradient(Boolean gradient)
    • compareTo

      public int compareTo(GanttBlock<T> o)
      Look at first the priority that is intended in descendant order. So priority 5 comes before priority 1. whether the two blocks have the same priority, the comparison is done using the begin date.
      Specified by:
      compareTo in interface Comparable<T>
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object