org.rapla.components.calendar
Class WeekendHighlightRenderer

java.lang.Object
  extended by org.rapla.components.calendar.WeekendHighlightRenderer
All Implemented Interfaces:
DateRenderer

public class WeekendHighlightRenderer
extends Object
implements DateRenderer

Renders the weekdays (or any other day of week, if selected) in a special color.


Constructor Summary
WeekendHighlightRenderer()
           
 
Method Summary
 Color getBackgroundColor(int dayOfWeek, int day, int month, int year)
          returns the value of #WEEKEND_BACKGROUND if day is set for highlight (default is saturday and sunday) and null if not.
 String getToolTipText(int dayOfWeek, int day, int month, int year)
          returns null
 boolean isHighlighted(int day)
           
 void setHighlight(int day, boolean highlight)
          enable/disable the highlighting for the selected day.
 void setWeekendBackgroundColor(Color color)
          Default color is #e2f3ff
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeekendHighlightRenderer

public WeekendHighlightRenderer()
Method Detail

setWeekendBackgroundColor

public void setWeekendBackgroundColor(Color color)
Default color is #e2f3ff


setHighlight

public void setHighlight(int day,
                         boolean highlight)
enable/disable the highlighting for the selected day. Default highlighted days are saturday and sunday.


isHighlighted

public boolean isHighlighted(int day)

getBackgroundColor

public Color getBackgroundColor(int dayOfWeek,
                                int day,
                                int month,
                                int year)
returns the value of #WEEKEND_BACKGROUND if day is set for highlight (default is saturday and sunday) and null if not.

Specified by:
getBackgroundColor in interface DateRenderer

getToolTipText

public String getToolTipText(int dayOfWeek,
                             int day,
                             int month,
                             int year)
returns null

Specified by:
getToolTipText in interface DateRenderer


Copyright © 2000-2006 Rapla Team. All Rights Reseserved.