org.apache.myfaces.custom.schedule.renderer
Class AbstractCompactScheduleRenderer
java.lang.Object
javax.faces.render.Renderer
org.apache.myfaces.custom.schedule.renderer.AbstractScheduleRenderer
org.apache.myfaces.custom.schedule.renderer.AbstractCompactScheduleRenderer
- Direct Known Subclasses:
- ScheduleCompactMonthRenderer, ScheduleCompactWeekRenderer
- public abstract class AbstractCompactScheduleRenderer
- extends AbstractScheduleRenderer
Abstract superclass for the week and month view renderers.
- Version:
- $Revision$
- Author:
- Jurgen Lust (latest modification by $Author$), Bruno Aranda (adaptation of Jurgen's code to myfaces)
Method Summary |
void |
encodeChildren(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
|
void |
encodeEnd(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
|
protected abstract int |
getDefaultRowHeight()
|
protected int |
getRowHeight(java.util.Map attributes)
|
protected abstract java.lang.String |
getRowHeightProperty()
|
protected void |
writeDayCell(javax.faces.context.FacesContext context,
javax.faces.context.ResponseWriter writer,
HtmlSchedule schedule,
ScheduleDay day,
float cellWidth,
int dayOfWeek,
int dayOfMonth,
boolean isWeekend,
boolean isCurrentMonth,
int rowspan)
Draw one day in the schedule
|
protected void |
writeEntries(javax.faces.context.FacesContext context,
HtmlSchedule schedule,
ScheduleDay day,
javax.faces.context.ResponseWriter writer)
Draw the schedule entries in the specified day cell
|
Methods inherited from class javax.faces.render.Renderer |
convertClientId, getConvertedValue, getRendersChildren |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractCompactScheduleRenderer
public AbstractCompactScheduleRenderer()
encodeChildren
public void encodeChildren(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
Renderer.encodeChildren(javax.faces.context.FacesContext,
javax.faces.component.UIComponent)
encodeEnd
public void encodeEnd(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
Renderer.encodeEnd(javax.faces.context.FacesContext,
javax.faces.component.UIComponent)
getDefaultRowHeight
protected abstract int getDefaultRowHeight()
- Returns:
- The default height, in pixels, of one row in the schedule grid
getRowHeightProperty
protected abstract java.lang.String getRowHeightProperty()
- Returns:
- The name of the property that determines the row height
getRowHeight
protected int getRowHeight(java.util.Map attributes)
- Parameters:
attributes
- The attributes
- Returns:
- The row height, in pixels
writeDayCell
protected void writeDayCell(javax.faces.context.FacesContext context,
javax.faces.context.ResponseWriter writer,
HtmlSchedule schedule,
ScheduleDay day,
float cellWidth,
int dayOfWeek,
int dayOfMonth,
boolean isWeekend,
boolean isCurrentMonth,
int rowspan)
throws java.io.IOException
Draw one day in the schedule
- Parameters:
context
- the FacesContextwriter
- the ResponseWriterschedule
- the scheduleday
- the day that should be drawncellWidth
- the width of the celldayOfWeek
- the day of the weekdayOfMonth
- the day of the monthisWeekend
- is it a weekend day?isCurrentMonth
- is the day in the currently selected month?rowspan
- the rowspan for the table cell
- Throws:
java.io.IOException
- when the cell could not be drawn
writeEntries
protected void writeEntries(javax.faces.context.FacesContext context,
HtmlSchedule schedule,
ScheduleDay day,
javax.faces.context.ResponseWriter writer)
throws java.io.IOException
Draw the schedule entries in the specified day cell
- Parameters:
context
- the FacesContextschedule
- the scheduleday
- the daywriter
- the ResponseWriter
- Throws:
java.io.IOException
- when the entries could not be drawn