org.rapla.components.calendar
Class DateRendererAdapter

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

public class DateRendererAdapter
extends Object
implements DateRenderer

Maps the DateRenderer methods to the appropriate date method.

See Also:
DateRenderer

Constructor Summary
DateRendererAdapter(DateRenderer renderer, TimeZone timeZone, Locale locale)
          use this constructor if you want to make an existing DateRenderer listen to the methods getBackgroundColor(Date) and getToolTipText(Date).
DateRendererAdapter(TimeZone timeZone, Locale locale)
          use this constructor if you want to implement a custom getBackgroundColor(Date) or getToolTipText(Date) method.
 
Method Summary
 Color getBackgroundColor(Date date)
          override this method for a custom background color
 Color getBackgroundColor(int dayOfWeek, int day, int month, int year)
          Specifies a special background color for the passed day.
 String getToolTipText(Date date)
          override this method for a custom tooltip Text.
 String getToolTipText(int dayOfWeek, int day, int month, int year)
          Specifies a tooltip text for the passed day.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateRendererAdapter

public DateRendererAdapter(TimeZone timeZone,
                           Locale locale)
use this constructor if you want to implement a custom getBackgroundColor(Date) or getToolTipText(Date) method.


DateRendererAdapter

public DateRendererAdapter(DateRenderer renderer,
                           TimeZone timeZone,
                           Locale locale)
use this constructor if you want to make an existing DateRenderer listen to the methods getBackgroundColor(Date) and getToolTipText(Date).

Method Detail

getBackgroundColor

public Color getBackgroundColor(Date date)
override this method for a custom background color

Returns:
null.

getToolTipText

public String getToolTipText(Date date)
override this method for a custom tooltip Text.

Returns:
null.

getBackgroundColor

public Color getBackgroundColor(int dayOfWeek,
                                int day,
                                int month,
                                int year)
Description copied from interface: DateRenderer
Specifies a special background color for the passed day. Return null if you want to use the default color.

Specified by:
getBackgroundColor in interface DateRenderer

getToolTipText

public String getToolTipText(int dayOfWeek,
                             int day,
                             int month,
                             int year)
Description copied from interface: DateRenderer
Specifies a tooltip text for the passed day. Return null if you don't want to use a tooltip for this day.

Specified by:
getToolTipText in interface DateRenderer


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