|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.calendartag.decorator.DefaultCalendarDecorator
org.calendartag.decorators.CalendarDecorator
The default implementation of CalendarDecorator
used when a decorator is not defined.
Field Summary | |
protected java.util.Calendar |
calendar
|
protected java.lang.String[] |
days
|
protected java.util.Calendar |
end
|
protected java.lang.String[] |
months
|
protected javax.servlet.jsp.PageContext |
pageContext
|
protected java.util.Calendar |
start
|
Constructor Summary | |
DefaultCalendarDecorator()
|
Method Summary | |
java.lang.String |
getCalendarTitle()
Returns the calendar's title using the month names and years. |
java.lang.String |
getDay(java.lang.String url)
Returns a string representing the day of the month. |
java.lang.String |
getDayStyleClass(boolean isOddMonth,
boolean isSelectedDay)
Returns an appropriate style class depending on whether the day is selected or unselected. |
java.lang.String |
getEmptyDay()
Returns empty content |
java.lang.String |
getNextLink(java.lang.String url)
Returns a ">>" hyperlink using the passed url |
java.lang.String |
getPreviousLink(java.lang.String url)
Returns a "<<" hyperlink using the passed url |
java.lang.String |
getWeekdayTitle(int day)
Returns the weekday title as assigned to the protected days array. |
void |
initializeCalendar()
Empty implementation |
void |
setCalendar(java.util.Calendar calendar)
Sets the calendar to the variable calendar |
void |
setEnd(java.util.Calendar end)
Sets the end calendar to the variable end |
void |
setPageContext(javax.servlet.jsp.PageContext pageContext)
Sets the page context to the variable pageContext |
void |
setStart(java.util.Calendar start)
Sets the start calendar to the variable start |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String[] months
protected java.lang.String[] days
protected javax.servlet.jsp.PageContext pageContext
protected java.util.Calendar calendar
protected java.util.Calendar start
protected java.util.Calendar end
Constructor Detail |
public DefaultCalendarDecorator()
Method Detail |
public java.lang.String getDayStyleClass(boolean isOddMonth, boolean isSelectedDay)
CalendarTag
's internal record. By default the month is considered odd.
getDayStyleClass
in interface CalendarDecorator
isOddMonth
- true if the month is oddisSelectedDay
- true if the day is selected
CalendarDecorator.getDayStyleClass(boolean, boolean)
public void initializeCalendar()
initializeCalendar
in interface CalendarDecorator
CalendarDecorator.initializeCalendar()
public java.lang.String getPreviousLink(java.lang.String url)
getPreviousLink
in interface CalendarDecorator
url
- the url that the previous link should point to
CalendarDecorator.getPreviousLink(java.lang.String)
public java.lang.String getNextLink(java.lang.String url)
getNextLink
in interface CalendarDecorator
url
- the url that the next link should point to
CalendarDecorator.getNextLink(java.lang.String)
public java.lang.String getCalendarTitle()
getCalendarTitle
in interface CalendarDecorator
CalendarDecorator.getCalendarTitle()
public java.lang.String getWeekdayTitle(int day)
getWeekdayTitle
in interface CalendarDecorator
day
- the day as an integer, 1-7 monday-friday
CalendarDecorator.getWeekdayTitle(int)
public java.lang.String getEmptyDay()
getEmptyDay
in interface CalendarDecorator
CalendarDecorator.getEmptyDay()
public java.lang.String getDay(java.lang.String url)
getDay
in interface CalendarDecorator
url
- the url that can be used to set the current day to focus
CalendarDecorator.getDay(java.lang.String)
public void setPageContext(javax.servlet.jsp.PageContext pageContext)
setPageContext
in interface CalendarDecorator
pageContext
- the pageContext of the HttpServletRequest
CalendarDecorator.setPageContext(javax.servlet.jsp.PageContext)
public void setCalendar(java.util.Calendar calendar)
setCalendar
in interface CalendarDecorator
calendar
- a Calendar
objectCalendarDecorator.setCalendar(java.util.Calendar)
public void setStart(java.util.Calendar start)
setStart
in interface CalendarDecorator
start
- the start dateCalendarDecorator.setStart(java.util.Calendar)
public void setEnd(java.util.Calendar end)
setEnd
in interface CalendarDecorator
end
- the end dateCalendarDecorator.setEnd(java.util.Calendar)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |