java.lang.Object
overit.geocallapp.utilities.ux.ui.container.gantt.view.renderer.GanttBaseRenderer<R,B>
Type Parameters:
R - the type of the GanttRow raw data
B - the type of the GanttBlock raw data
All Implemented Interfaces:
Serializable, GanttRenderer<R,B>
Direct Known Subclasses:
GanttTimeLineRenderer, GanttTreeRenderer

public abstract class GanttBaseRenderer<R,B> extends Object implements GanttRenderer<R,B>, Serializable
See Also:
  • Field Details

  • Constructor Details

    • GanttBaseRenderer

      public GanttBaseRenderer()
  • Method Details

    • setWidth

      public void setWidth(double width)
      Specified by:
      setWidth in interface GanttRenderer<R,B>
      Parameters:
      width - the width (percentage) to set to this renderer component
    • setItemClickEvent

      public void setItemClickEvent(String event)
      Specified by:
      setItemClickEvent in interface GanttRenderer<R,B>
      Parameters:
      event - the item click event to associate to the item HTML element
    • setItemContextMenuEvent

      public void setItemContextMenuEvent(String event)
      Specified by:
      setItemContextMenuEvent in interface GanttRenderer<R,B>
      Parameters:
      event - the context menu event to associate to the item HTML element
    • addEventValidation

      protected void addEventValidation(GanttView view)
      Parameters:
      view - the GanttView for which add the renderer events to the event fire-wall validation
    • buildContainerStyle

      protected String buildContainerStyle(GanttViewConfiguration config)
      According to the current configuration, generate the CSS string to set to main html element generated from this renderer
      Parameters:
      config - the GanttViewConfiguration to consider
      Returns:
      the generated CSS string
    • getHeaderHeight

      protected int getHeaderHeight(GanttViewConfiguration config)
      Parameters:
      config - the GanttViewConfiguration to consider
      Returns:
      the number of pixels to use as height for the whole header HTML element
    • getHelper

      protected GanttHeaderRendererHelper getHelper(Integer type)
      Parameters:
      type - the required brick type
      Returns:
      the right implementation of GanttHeaderRendererHelper according to the required type
      Throws:
      UnsupportedOperationException - if the given type is unknown
    • clearRenderedElements

      protected void clearRenderedElements()
      reset the generated HTML elements to be ready to start a new rendering process
    • buildGridRow

      protected org.apache.ecs.html.Div buildGridRow(GanttView view)
      Parameters:
      view - the target GanttView
      Returns:
      a Div that represents a background grid row
    • buildGridCol

      protected org.apache.ecs.html.Div buildGridCol(GanttView view, double columnWidth)
      Parameters:
      view - the target GanttView
      Returns:
      a Div that represents a background grid column
    • getRowBaseStyle

      protected String getRowBaseStyle(GanttViewConfiguration config)
      Parameters:
      config - the GanttViewConfiguration to consider
      Returns:
      the CSS string
    • addEvent

      protected void addEvent(String event)
      Allow the caller to add an event name to the list of events that should be validated by the event fire-wall
      Parameters:
      event - the event to add
    • getWidth

      public double getWidth()
      Specified by:
      getWidth in interface GanttRenderer<R,B>
      Returns:
      the width (percentage) to set to this renderer component
    • cleaner

      protected Cleaner cleaner()
    • initIndicatorsMap

      protected void initIndicatorsMap()