JIDE 3.5.15

com.jidesoft.gantt
Interface PeriodBackgroundPainter<T>

Type Parameters:
T - The type of the bases unit of the scale, for example Date or Integer.
All Known Implementing Classes:
AbstractPeriodBackgroundPainter, AbstractPeriodMarker, AbstractRowBackgroundPainter, DatePeriodMarker, DefaultPeriodBackgroundPainter, IntervalMarker

public interface PeriodBackgroundPainter<T>

PeriodBackgroundPainter is an interface used by GanttChart to paint the period background.


Method Summary
 Period getPeriod()
          If the period is null, paint periodChartBackground will be called once, but the start and end instant will be null and the coordinates will be invalid.
 void paintPeriodBackground(GanttChart<T,GanttEntry<T>> ganttChart, Graphics2D g, T startInstant, T endInstant, int periodStartX, int periodStartY, int periodEndX, int periodEndY)
          Paints the background.
 

Method Detail

paintPeriodBackground

void paintPeriodBackground(GanttChart<T,GanttEntry<T>> ganttChart,
                           Graphics2D g,
                           T startInstant,
                           T endInstant,
                           int periodStartX,
                           int periodStartY,
                           int periodEndX,
                           int periodEndY)
Paints the background.

Parameters:
ganttChart - the gantt chart.
g - the graphics
startInstant - the starting value of the current period. The painter will paint the background of gantt chart period by period. Each time, this method will be called for each period. The startInstant is the starting value of the current period.
endInstant - the ending value of the current period.
periodStartX - the startX of the current period.
periodStartY - the startY of the current period.
periodEndX - the endX of the current period.
periodEndY - the endY of the current period.

getPeriod

Period getPeriod()
If the period is null, paint periodChartBackground will be called once, but the start and end instant will be null and the coordinates will be invalid. The latter should be calculated by the painter itself using the scale area and model.

Returns:
The Period this painter paints a background for or null to mark a specific interval.

JIDE 3.5.15