Class GanttYearHeaderHelper
java.lang.Object
overit.geocallapp.utilities.ux.ui.container.gantt.view.renderer.helper.GanttYearHeaderHelper
- All Implemented Interfaces:
Serializable,GanttHeaderRendererHelper
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdoublecalculateBrickWidth(GanttViewConfiguration config, Date date, Date rangeBegin, Date rangeEnd) doubleformatDate(GanttViewConfiguration config, Teacher teacher, Date date, double width) Date[]getBoundingDates(Date date, GanttViewConfiguration config) getRoundedEnd(GanttViewConfiguration config) protected LocalDatetoLocalDate(Date date)
-
Constructor Details
-
GanttYearHeaderHelper
public GanttYearHeaderHelper()
-
-
Method Details
-
calculateBrickNumber
- Specified by:
calculateBrickNumberin interfaceGanttHeaderRendererHelper- Parameters:
config- theGanttViewConfigurationwith the current user preference for the visualization- Returns:
- the number of brick to render according to the configuration and the specific time unit implemented
-
formatDate
- Specified by:
formatDatein interfaceGanttHeaderRendererHelper- Parameters:
config- theGanttViewConfigurationwith the current user preference for the visualizationteacher- tTeacherto do translations if neededdate- theDateto formatwidth-- Returns:
- a String that represents the given
Datefor the specific time unit implementation
-
nextDate
- Specified by:
nextDatein interfaceGanttHeaderRendererHelper- Parameters:
date- the currentDate- Returns:
- the next
Dateto render according to the specific time unit implementation
-
getRoundedBegin
- Specified by:
getRoundedBeginin interfaceGanttHeaderRendererHelper- Parameters:
config- theGanttViewConfigurationwith the current user preference for the visualization- Returns:
- the begin date of the visible range rounded according to the specific time unit implementation
-
getRoundedEnd
- Specified by:
getRoundedEndin interfaceGanttHeaderRendererHelper- Parameters:
config- theGanttViewConfigurationwith the current user preference for the visualization- Returns:
- the end date of the visible range rounded according to the specific time unit implementation
-
getBoundingDates
- Specified by:
getBoundingDatesin interfaceGanttHeaderRendererHelper- Parameters:
date- the target dateconfig- the gantt view configuration- Returns:
- the bounding dates that holds the target date, according to the specific time unit implementation. For example, if the target date is 01/01/2012 05:09 with brick type hour, and the implementation is for the day, the bounding dates will be [01/01/2012 00:00, 01/01/2012 23:59]
-
toLocalDate
-
getDescription
- Specified by:
getDescriptionin interfaceGanttHeaderRendererHelper- Returns:
- a
Stringdescription to use to allow the user to select this time unit implementation or simply to describe it
-
calculateRowWidth
- Specified by:
calculateRowWidthin interfaceGanttHeaderRendererHelper- Parameters:
config- theGanttViewConfigurationwith the current user preference for the visualization- Returns:
- the with in px to use for a gantt row
-
calculateBrickWidth
public double calculateBrickWidth(GanttViewConfiguration config, Date date, Date rangeBegin, Date rangeEnd) - Specified by:
calculateBrickWidthin interfaceGanttHeaderRendererHelper- Parameters:
config- theGanttViewConfigurationwith the current user preference for the visualizationdate- the date that the brick representsrangeBegin- the visible begin daterangeEnd- the visible end date- Returns:
- the width in px to use for this brick
-