org.apache.myfaces.custom.schedule.renderer
Class ScheduleDetailedDayRenderer
java.lang.Object
javax.faces.render.Renderer
org.apache.myfaces.custom.schedule.renderer.AbstractScheduleRenderer
org.apache.myfaces.custom.schedule.renderer.ScheduleDetailedDayRenderer
- All Implemented Interfaces:
- java.io.Serializable
public class ScheduleDetailedDayRenderer
- extends AbstractScheduleRenderer
- implements java.io.Serializable
Renderer for the day and workweek views of the Schedule component
- Version:
- $Revision: 392301 $
- Author:
- Jurgen Lust (latest modification by $Author: jlust $), Bruno Aranda (adaptation of Jurgen's code to myfaces)
- See Also:
- Serialized Form
Method Summary |
protected java.util.Date |
determineLastClickedDate(HtmlSchedule schedule,
java.lang.String dateId,
java.lang.String yPos)
In the detailed day renderer, we take the y coordinate of the mouse
into account when determining the last clicked date. |
void |
encodeBegin(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
|
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 boolean |
expandToFitEntries(javax.faces.component.UIComponent component)
When the start- and endtime of an entry are the same, should the entry
be rendered, fitting the entry box to the text? |
protected java.lang.String |
getCellClass(HtmlSchedule schedule,
int column,
int row,
int hour)
|
protected int |
getDefaultRowHeight()
|
protected int |
getRenderedEndHour(HtmlSchedule schedule)
|
protected int |
getRenderedStartHour(HtmlSchedule schedule)
|
protected java.lang.String |
getRowHeightProperty()
|
protected boolean |
isSelected(HtmlSchedule schedule,
ScheduleDetailedDayRenderer.EntryWrapper entry)
|
protected void |
maximizeEntries(ScheduleDetailedDayRenderer.EntryWrapper[] entries,
int numberOfColumns)
|
protected boolean |
renderZeroLengthEntries(javax.faces.component.UIComponent component)
When the start- and endtime of an entry are the same, should the entry
be rendered, fitting the entry box to the text? |
protected void |
scanEntries(ScheduleDetailedDayRenderer.EntryWrapper[] entries,
int index)
|
protected void |
writeBackground(javax.faces.context.FacesContext context,
HtmlSchedule schedule,
javax.faces.context.ResponseWriter writer)
|
protected void |
writeEntries(javax.faces.context.FacesContext context,
HtmlSchedule schedule,
ScheduleDay day,
javax.faces.context.ResponseWriter writer)
|
protected void |
writeForegroundEnd(javax.faces.context.ResponseWriter writer)
|
protected void |
writeForegroundStart(javax.faces.context.FacesContext context,
HtmlSchedule schedule,
javax.faces.context.ResponseWriter writer)
|
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 |
ScheduleDetailedDayRenderer
public ScheduleDetailedDayRenderer()
encodeBegin
public void encodeBegin(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
throws java.io.IOException
- Overrides:
encodeBegin
in class AbstractScheduleRenderer
- Throws:
java.io.IOException
- See Also:
Renderer.encodeBegin(javax.faces.context.FacesContext,
javax.faces.component.UIComponent)
encodeChildren
public void encodeChildren(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
throws java.io.IOException
- Overrides:
encodeChildren
in class javax.faces.render.Renderer
- 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
- Overrides:
encodeEnd
in class javax.faces.render.Renderer
- Throws:
java.io.IOException
- See Also:
Renderer.encodeEnd(javax.faces.context.FacesContext,
javax.faces.component.UIComponent)
getCellClass
protected java.lang.String getCellClass(HtmlSchedule schedule,
int column,
int row,
int hour)
isSelected
protected boolean isSelected(HtmlSchedule schedule,
ScheduleDetailedDayRenderer.EntryWrapper entry)
maximizeEntries
protected void maximizeEntries(ScheduleDetailedDayRenderer.EntryWrapper[] entries,
int numberOfColumns)
scanEntries
protected void scanEntries(ScheduleDetailedDayRenderer.EntryWrapper[] entries,
int index)
writeBackground
protected void writeBackground(javax.faces.context.FacesContext context,
HtmlSchedule schedule,
javax.faces.context.ResponseWriter writer)
throws java.io.IOException
- Throws:
java.io.IOException
getRenderedStartHour
protected int getRenderedStartHour(HtmlSchedule schedule)
getRenderedEndHour
protected int getRenderedEndHour(HtmlSchedule schedule)
writeEntries
protected void writeEntries(javax.faces.context.FacesContext context,
HtmlSchedule schedule,
ScheduleDay day,
javax.faces.context.ResponseWriter writer)
throws java.io.IOException
- Throws:
java.io.IOException
writeForegroundEnd
protected void writeForegroundEnd(javax.faces.context.ResponseWriter writer)
throws java.io.IOException
- Throws:
java.io.IOException
writeForegroundStart
protected void writeForegroundStart(javax.faces.context.FacesContext context,
HtmlSchedule schedule,
javax.faces.context.ResponseWriter writer)
throws java.io.IOException
- Throws:
java.io.IOException
getRowHeightProperty
protected java.lang.String getRowHeightProperty()
- Specified by:
getRowHeightProperty
in class AbstractScheduleRenderer
- Returns:
- The name of the property that determines the row height
getDefaultRowHeight
protected int getDefaultRowHeight()
- Specified by:
getDefaultRowHeight
in class AbstractScheduleRenderer
- Returns:
- The default height, in pixels, of one row in the schedule grid
determineLastClickedDate
protected java.util.Date determineLastClickedDate(HtmlSchedule schedule,
java.lang.String dateId,
java.lang.String yPos)
- In the detailed day renderer, we take the y coordinate of the mouse
into account when determining the last clicked date.
- Specified by:
determineLastClickedDate
in class AbstractScheduleRenderer
- Parameters:
schedule
- the schedule componentdateId
- the string identifying the dateyPos
- the y coordinate of the mouse
- Returns:
- the clicked date
renderZeroLengthEntries
protected boolean renderZeroLengthEntries(javax.faces.component.UIComponent component)
When the start- and endtime of an entry are the same, should the entry
be rendered, fitting the entry box to the text?
- Parameters:
component
- the component
- Returns:
- whether or not zero length entries should be rendered
expandToFitEntries
protected boolean expandToFitEntries(javax.faces.component.UIComponent component)
When the start- and endtime of an entry are the same, should the entry
be rendered, fitting the entry box to the text?
- Parameters:
component
- the component
- Returns:
- whether or not zero length entries should be rendered
Copyright © 2009. All Rights Reserved.