net.sf.nachocalendar.tasks

Class TaskRenderer

Implemented Interfaces:
DayRenderer

public class TaskRenderer
extends JLabel
implements DayRenderer

Renderer customized to show dates with tasks assigned in yellow background. It also creates a tooltip with the quantity of tasks related to the Date.
Author:
Ignacio Merani

Constructor Summary

TaskRenderer()
Creates a new instance of TaskRenderer.

Method Summary

Component
getDayRenderer(DayPanel daypanel, Date day, Object data, boolean selected, boolean working, boolean enabled)
Returns a component configured to render the Day.
Color
getTaskBg()
void
setTaskBg(Color taskBg)

Constructor Details

TaskRenderer

public TaskRenderer()
Creates a new instance of TaskRenderer.

Method Details

getDayRenderer

public Component getDayRenderer(DayPanel daypanel,
                                Date day,
                                Object data,
                                boolean selected,
                                boolean working,
                                boolean enabled)
Returns a component configured to render the Day.
Parameters:
daypanel - Daypanel to be renderer
day - current day
data - current data
selected - true if it's selected
working - true if it's a working day
enabled - true if it's enabled
Returns:
component to be used

getTaskBg

public Color getTaskBg()
Returns:
Returns the taskBg.

setTaskBg

public void setTaskBg(Color taskBg)
Parameters:
taskBg - The taskBg to set.