Class DefaultGanttBarRenderer

java.lang.Object
com.codename1.ui.scheduler.DefaultGanttBarRenderer
All Implemented Interfaces:
GanttBarRenderer

public class DefaultGanttBarRenderer extends Object implements GanttBarRenderer

The renderer a Gantt starts with: a rounded bar with its progress filled in, a bracket for a summary and a diamond for a milestone.

The colours come from GanttBar, GanttBarProgress, GanttBarCritical, GanttSummaryBar and GanttMilestone, or from the task's own UIID or colour when it has one.

  • Constructor Details

    • DefaultGanttBarRenderer

      public DefaultGanttBarRenderer()
  • Method Details

    • paintBar

      public void paintBar(Graphics g, Gantt gantt, GanttTask task, int x, int y, int width, int height, int state)
      Description copied from interface: GanttBarRenderer

      Paints task into a rectangle: the span of its dates across and the height of a bar. For a milestone the rectangle is the square its mark is drawn in.

      Parameters
      • state: a combination of the constants of this interface
      Specified by:
      paintBar in interface GanttBarRenderer
    • colorOf

      protected int colorOf(GanttTask task, String uiid, boolean foreground)
      The colour of a task: its own, its UIID's, or the theme's for its kind.