org.apache.myfaces.custom.schedule
Class UISchedule

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by org.apache.myfaces.custom.schedule.UISchedule
All Implemented Interfaces:
java.io.Serializable, javax.faces.component.ActionSource, javax.faces.component.StateHolder, javax.faces.component.ValueHolder
Direct Known Subclasses:
HtmlSchedule

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

A schedule component similar to the ones found in Outlook or Evolution

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

Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
static java.lang.String DEFAULT_RENDERER_TYPE
           
 
Constructor Summary
UISchedule()
          Creates a new UISchedule object.
 
Method Summary
 void addActionListener(javax.faces.event.ActionListener listener)
           
 void broadcast(javax.faces.event.FacesEvent event)
           
 ScheduleEntry findEntry(java.lang.String id)
           Find the entry with the given id
 javax.faces.el.MethodBinding getAction()
           
 javax.faces.el.MethodBinding getActionListener()
           
 javax.faces.event.ActionListener[] getActionListeners()
           
 javax.faces.convert.Converter getConverter()
           
 java.lang.String getFamily()
           
 java.lang.Object getLocalValue()
           
 ScheduleModel getModel()
           The underlying model
 boolean getRendersChildren()
           
 ScheduleEntry getSubmittedEntry()
           The entry that was submitted on the last request
 java.lang.Object getValue()
           
 int getVisibleEndHour()
           The last visible hour of the day
 int getVisibleStartHour()
           The first visible hour of the day
 int getWorkingEndHour()
           The last hour of the working day
 int getWorkingStartHour()
           The first hour of the working day
 boolean isImmediate()
           
 boolean isReadonly()
           is this component read-only?
 void queueEvent(javax.faces.event.FacesEvent event)
           
 void removeActionListener(javax.faces.event.ActionListener listener)
           
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setAction(javax.faces.el.MethodBinding action)
           
 void setActionListener(javax.faces.el.MethodBinding listener)
           
 void setConverter(javax.faces.convert.Converter converter)
           
 void setImmediate(boolean immediate)
           
 void setModel(ScheduleModel model)
           The underlying model
 void setReadonly(boolean readonly)
           is this component read-only?
 void setSubmittedEntry(ScheduleEntry submittedEntry)
           The entry that was submitted on the last request
 void setValue(java.lang.Object value)
           
 void setVisibleEndHour(int visibleEndHour)
           The last visible hour of the day
 void setVisibleStartHour(int visibleStartHour)
           The first visible hour of the day
 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, 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, 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_FAMILY

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

COMPONENT_TYPE

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

DEFAULT_RENDERER_TYPE

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

UISchedule

public UISchedule()
Creates a new UISchedule object.

Method Detail

addActionListener

public void addActionListener(javax.faces.event.ActionListener listener)
Specified by:
addActionListener in interface javax.faces.component.ActionSource
See Also:
ActionSource.addActionListener(javax.faces.event.ActionListener)

broadcast

public void broadcast(javax.faces.event.FacesEvent event)
               throws javax.faces.event.AbortProcessingException
Overrides:
broadcast in class javax.faces.component.UIComponentBase
Throws:
javax.faces.event.AbortProcessingException
See Also:
UIComponent.broadcast(javax.faces.event.FacesEvent)

findEntry

public ScheduleEntry findEntry(java.lang.String id)

Find the entry with the given id

Parameters:
id - the id
Returns:
the entry

getAction

public javax.faces.el.MethodBinding getAction()
Specified by:
getAction in interface javax.faces.component.ActionSource
See Also:
ActionSource.getAction()

getActionListener

public javax.faces.el.MethodBinding getActionListener()
Specified by:
getActionListener in interface javax.faces.component.ActionSource
See Also:
ActionSource.getActionListener()

getActionListeners

public javax.faces.event.ActionListener[] getActionListeners()
Specified by:
getActionListeners in interface javax.faces.component.ActionSource
See Also:
ActionSource.getActionListeners()

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()
Specified by:
getFamily in class javax.faces.component.UIComponent
See Also:
UIComponent.getFamily()

getLocalValue

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

getModel

public ScheduleModel getModel()

The underlying model

Returns:
Returns the model.

getRendersChildren

public boolean getRendersChildren()
Overrides:
getRendersChildren in class javax.faces.component.UIComponentBase
See Also:
UIComponent.getRendersChildren()

getSubmittedEntry

public ScheduleEntry getSubmittedEntry()

The entry that was submitted on the last request

Returns:
Returns the submittedEntry.

getValue

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

getVisibleEndHour

public int getVisibleEndHour()

The last visible hour of the day

Returns:
Returns the visibleEndHour.

getVisibleStartHour

public int getVisibleStartHour()

The first visible hour of the day

Returns:
Returns the visibleStartHour.

getWorkingEndHour

public int getWorkingEndHour()

The last hour of the working day

Returns:
Returns the workingEndHour.

getWorkingStartHour

public int getWorkingStartHour()

The first hour of the working day

Returns:
Returns the workingStartHour.

isImmediate

public boolean isImmediate()
Specified by:
isImmediate in interface javax.faces.component.ActionSource
See Also:
ActionSource.isImmediate()

isReadonly

public boolean isReadonly()

is this component read-only?

Returns:
is this component read-only

queueEvent

public void queueEvent(javax.faces.event.FacesEvent event)
Overrides:
queueEvent in class javax.faces.component.UIComponentBase
See Also:
UIComponent.queueEvent(javax.faces.event.FacesEvent)

removeActionListener

public void removeActionListener(javax.faces.event.ActionListener listener)
Specified by:
removeActionListener in interface javax.faces.component.ActionSource
See Also:
ActionSource.removeActionListener(javax.faces.event.ActionListener)

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class javax.faces.component.UIComponentBase
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
Overrides:
saveState in class javax.faces.component.UIComponentBase
See Also:
StateHolder.saveState(javax.faces.context.FacesContext)

setAction

public void setAction(javax.faces.el.MethodBinding action)
Specified by:
setAction in interface javax.faces.component.ActionSource
See Also:
ActionSource.setAction(javax.faces.el.MethodBinding)

setActionListener

public void setActionListener(javax.faces.el.MethodBinding listener)
Specified by:
setActionListener in interface javax.faces.component.ActionSource
See Also:
ActionSource.setActionListener(javax.faces.el.MethodBinding)

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)

setImmediate

public void setImmediate(boolean immediate)
Specified by:
setImmediate in interface javax.faces.component.ActionSource
See Also:
ActionSource.setImmediate(boolean)

setModel

public void setModel(ScheduleModel model)

The underlying model

Parameters:
model - The model to set.

setReadonly

public void setReadonly(boolean readonly)

is this component read-only?

Parameters:
readonly - is this component read-only

setSubmittedEntry

public void setSubmittedEntry(ScheduleEntry submittedEntry)

The entry that was submitted on the last request

Parameters:
submittedEntry - The submittedEntry to set.

setValue

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

setVisibleEndHour

public void setVisibleEndHour(int visibleEndHour)

The last visible hour of the day

Parameters:
visibleEndHour - The visibleEndHour to set.

setVisibleStartHour

public void setVisibleStartHour(int visibleStartHour)

The first visible hour of the day

Parameters:
visibleStartHour - The visibleStartHour to set.

setWorkingEndHour

public void setWorkingEndHour(int workingEndHour)

The last hour of the working day

Parameters:
workingEndHour - The workingEndHour to set.

setWorkingStartHour

public void setWorkingStartHour(int workingStartHour)

The first hour of the working day

Parameters:
workingStartHour - The workingStartHour to set.


Copyright © 2011. All Rights Reserved.