org.apache.myfaces.custom.schedule
Class ScheduleDetailedDayRenderer

java.lang.Object
  extended by javax.faces.render.Renderer
      extended by org.apache.myfaces.custom.schedule.AbstractScheduleRenderer
          extended by org.apache.myfaces.custom.schedule.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

Since:
1.1.7
Version:
$Revision: 392301 $
Author:
Jurgen Lust (latest modification by $Author: jlust $), Bruno Aranda (adaptation of Jurgen's code to myfaces)
See Also:
Serialized Form

Nested Class Summary
protected  class ScheduleDetailedDayRenderer.EntryWrapper
           
 
Field Summary
 
Fields inherited from class org.apache.myfaces.custom.schedule.AbstractScheduleRenderer
comparator, DEFAULT_THEME, EVOLUTION_THEME, LAST_CLICKED_DATE, LAST_CLICKED_Y, OUTLOOK_THEME
 
Constructor Summary
ScheduleDetailedDayRenderer()
           
 
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, ScheduleDay day, boolean even, int hour)
           
protected  int getDefaultRowHeight()
           
protected  int getRenderedEndHour(HtmlSchedule schedule)
           
protected  int getRenderedStartHour(HtmlSchedule schedule)
           
protected  int getRowHeight(UIScheduleBase schedule)
           
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 writeBackgroundEnd(javax.faces.context.ResponseWriter writer)
           
protected  void writeBackgroundStart(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)
           
protected  void writeGutter(javax.faces.context.FacesContext context, HtmlSchedule schedule, javax.faces.context.ResponseWriter writer, boolean useIntervalLabels)
           
 
Methods inherited from class org.apache.myfaces.custom.schedule.AbstractScheduleRenderer
decode, getCalendarInstance, getDateFormat, getDateFormat, getDateString, getEntryRenderer, getRendersChildren, getStyleClass
 
Methods inherited from class javax.faces.render.Renderer
convertClientId, getConvertedValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScheduleDetailedDayRenderer

public ScheduleDetailedDayRenderer()
Method Detail

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,
                                        ScheduleDay day,
                                        boolean even,
                                        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)

writeGutter

protected void writeGutter(javax.faces.context.FacesContext context,
                           HtmlSchedule schedule,
                           javax.faces.context.ResponseWriter writer,
                           boolean useIntervalLabels)
                    throws java.io.IOException
Throws:
java.io.IOException

writeBackgroundStart

protected void writeBackgroundStart(javax.faces.context.FacesContext context,
                                    HtmlSchedule schedule,
                                    javax.faces.context.ResponseWriter writer)
                             throws java.io.IOException
Throws:
java.io.IOException

writeBackgroundEnd

protected void writeBackgroundEnd(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

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 component
dateId - the string identifying the date
yPos - 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

getRowHeight

protected int getRowHeight(UIScheduleBase schedule)
Specified by:
getRowHeight in class AbstractScheduleRenderer
Parameters:
schedule - The schedule
Returns:
The row height, in pixels


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.