zul.db
Class Renderer

java.lang.Object
  extended by zul.db.Renderer

public class Renderer
extends java.lang.Object

The renderer used to render a calendar. It is designed to be overridden


Method Summary
static void beforeRedraw(Calendar cal)
          Called before Widget.redraw(_global_.Array) is invoked.
static String cellHTML(Calendar cal, int y, int m, int day, int monthofs)
          Returns the HTML fragment representing a day cell.
static void dayView(Calendar wgt, Array out, Map localizedSymbols)
          Renderer the dayView for this calendar
static void decadeView(Calendar wgt, Array out, Map localizedSymbols)
          Renderer the decadeView for this calendar
static boolean disabled(Calendar cal, int y, int m, int v, Date today)
          Tests if the specified date is disabled.
static String labelOfWeekOfYear(Calendar wgt, int the, Map localizedSymbols)
          Generates the label of the week of year.
static void monthView(Calendar wgt, Array out, Map localizedSymbols)
          Renderer the monthView for this calendar
static String titleOfWeekOfYear(Calendar wgt)
          Generates the title of the week of year.
static void yearView(Calendar wgt, Array out, Map localizedSymbols)
          Renderer the yearView for this calendar
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

cellHTML

public static String cellHTML(Calendar cal,
                              int y,
                              int m,
                              int day,
                              int monthofs)
Returns the HTML fragment representing a day cell. By overriding this method, you could customize the look of a day cell.

Default: day

Parameters:
cal - the calendar
y - the year
m - the month (between 0 to 11)
day - the day (between 1 to 31)
monthofs - the month offset. If the day is in the same month
Returns:
String the HTML fragment
Since:
5.0.3

beforeRedraw

public static void beforeRedraw(Calendar cal)
Called before Widget.redraw(_global_.Array) is invoked.

Default: does nothing

Parameters:
cal - the calendar
Since:
5.0.3

disabled

public static boolean disabled(Calendar cal,
                               int y,
                               int m,
                               int v,
                               Date today)
Tests if the specified date is disabled.

Default: it depends on the constraint, if any

Parameters:
cal - the calendar
y - the year
m - the month (between 0 to 11)
v - the day (between 1 to 31)
today - today
Returns:
boolean
Since:
5.0.3

labelOfWeekOfYear

public static String labelOfWeekOfYear(Calendar wgt,
                                       int the,
                                       Map localizedSymbols)
Generates the label of the week of year.

Default: the string of the value

Parameters:
wgt - the calendar widget
the - number of the week of the value
localizedSymbols - the symbols for localization
Returns:
String the label of the week of year
Since:
6.5.0

titleOfWeekOfYear

public static String titleOfWeekOfYear(Calendar wgt)
Generates the title of the week of year.

Default: 'Wk'

Parameters:
wgt - the calendar widget
Returns:
String the title of the week of year
Since:
6.5.0

dayView

public static void dayView(Calendar wgt,
                           Array out,
                           Map localizedSymbols)
Renderer the dayView for this calendar

Parameters:
wgt - the calendar widget
out - an array to output HTML fragments.
localizedSymbols - the symbols for localization
Since:
6.5.0

monthView

public static void monthView(Calendar wgt,
                             Array out,
                             Map localizedSymbols)
Renderer the monthView for this calendar

Parameters:
wgt - the calendar widget
out - an array to output HTML fragments.
localizedSymbols - the symbols for localization
Since:
6.5.0

yearView

public static void yearView(Calendar wgt,
                            Array out,
                            Map localizedSymbols)
Renderer the yearView for this calendar

Parameters:
wgt - the calendar widget
out - an array to output HTML fragments.
localizedSymbols - the symbols for localization
Since:
6.5.0

decadeView

public static void decadeView(Calendar wgt,
                              Array out,
                              Map localizedSymbols)
Renderer the decadeView for this calendar

Parameters:
wgt - the calendar widget
out - an array to output HTML fragments.
localizedSymbols - the symbols for localization
Since:
6.5.0


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo