org.apache.myfaces.custom.schedule
Class UIPlanner

java.lang.Object
  extended byjavax.faces.component.UIComponent
      extended byjavax.faces.component.UIComponentBase
          extended byorg.apache.myfaces.custom.schedule.UIPlanner
All Implemented Interfaces:
java.io.Serializable, javax.faces.component.StateHolder, javax.faces.component.ValueHolder
Direct Known Subclasses:
HtmlPlanner

public class UIPlanner
extends javax.faces.component.UIComponentBase
implements javax.faces.component.ValueHolder, java.io.Serializable

A meeting planner component, similar to the ones found in Outlook or Evolution.

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

Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
          Logger for this class
static java.lang.String DEFAULT_RENDERER_TYPE
           
 
Constructor Summary
UIPlanner()
          Creates a new UIPlanner object.
 
Method Summary
 ScheduleEntry findEntry(java.lang.String id)
           Find the entry with the given id
 javax.faces.convert.Converter getConverter()
           
 java.lang.String getFamily()
           
 java.lang.Object getLocalValue()
           
 PlannerModel getModel()
           The underlying planner model
 boolean getRendersChildren()
           
 java.lang.Object getValue()
           
 int getVisibleEndHour()
           The last hour of the day that is visible in the planner
 int getVisibleStartHour()
           the first hour of the day that is visible in the planner
 int getWorkingEndHour()
           the last hour of the working day
 int getWorkingStartHour()
           The first hour of the working day
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setConverter(javax.faces.convert.Converter converter)
           
 void setModel(PlannerModel model)
           The underlying planner model
 void setValue(java.lang.Object value)
           
 void setVisibleEndHour(int visibleEndHour)
           the last hour of the day that is visible in the planner
 void setVisibleStartHour(int visibleStartHour)
           the first hour of the day that is visible in the planner
 void setWorkingEndHour(int workingEndHour)
           the last hour of the working day
 void setWorkingStartHour(int workingStartHour)
           The first hour of the working day
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
Logger for this class

See Also:
Constant Field Values

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values

DEFAULT_RENDERER_TYPE

public static final java.lang.String DEFAULT_RENDERER_TYPE
See Also:
Constant Field Values
Constructor Detail

UIPlanner

public UIPlanner()
Creates a new UIPlanner object.

Method Detail

setConverter

public void setConverter(javax.faces.convert.Converter converter)
Specified by:
setConverter in interface javax.faces.component.ValueHolder
See Also:
ValueHolder.setConverter(javax.faces.convert.Converter)

getConverter

public javax.faces.convert.Converter getConverter()
Specified by:
getConverter in interface javax.faces.component.ValueHolder
See Also:
ValueHolder.getConverter()

getFamily

public java.lang.String getFamily()
See Also:
UIComponent.getFamily()

getLocalValue

public java.lang.Object getLocalValue()
Specified by:
getLocalValue in interface javax.faces.component.ValueHolder
See Also:
ValueHolder.getLocalValue()

setModel

public void setModel(PlannerModel model)

The underlying planner model

Parameters:
model - the model

getModel

public PlannerModel getModel()

The underlying planner model

Returns:
the model

getRendersChildren

public boolean getRendersChildren()
See Also:
UIComponent.getRendersChildren()

setValue

public void setValue(java.lang.Object value)
Specified by:
setValue in interface javax.faces.component.ValueHolder
See Also:
ValueHolder.setValue(java.lang.Object)

getValue

public java.lang.Object getValue()
Specified by:
getValue in interface javax.faces.component.ValueHolder
See Also:
ValueHolder.getValue()

setVisibleEndHour

public void setVisibleEndHour(int visibleEndHour)

the last hour of the day that is visible in the planner

Parameters:
visibleEndHour - The visibleEndHour to set.

getVisibleEndHour

public int getVisibleEndHour()

The last hour of the day that is visible in the planner

Returns:
Returns the visibleEndHour.

setVisibleStartHour

public void setVisibleStartHour(int visibleStartHour)

the first hour of the day that is visible in the planner

Parameters:
visibleStartHour - The visibleStartHour to set.

getVisibleStartHour

public int getVisibleStartHour()

the first hour of the day that is visible in the planner

Returns:
Returns the visibleStartHour.

setWorkingEndHour

public void setWorkingEndHour(int workingEndHour)

the last hour of the working day

Parameters:
workingEndHour - The workingEndHour to set.

getWorkingEndHour

public int getWorkingEndHour()

the last hour of the working day

Returns:
Returns the workingEndHour.

setWorkingStartHour

public void setWorkingStartHour(int workingStartHour)

The first hour of the working day

Parameters:
workingStartHour - The workingStartHour to set.

getWorkingStartHour

public int getWorkingStartHour()

The first hour of the working day

Returns:
Returns the workingStartHour.

findEntry

public ScheduleEntry findEntry(java.lang.String id)

Find the entry with the given id

Parameters:
id - the id
Returns:
the entry

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
See Also:
StateHolder.restoreState(javax.faces.context.FacesContext, java.lang.Object)

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
See Also:
StateHolder.saveState(javax.faces.context.FacesContext)