|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.myfaces.custom.schedule.model.AbstractScheduleModel
Extend this class to create your own implementation of a ScheduleModel
| Field Summary | |
protected java.util.TreeSet |
days
|
| Fields inherited from interface org.apache.myfaces.custom.schedule.model.ScheduleModel |
DAY, MONTH, WEEK, WORKWEEK |
| Constructor Summary | |
AbstractScheduleModel()
Creates a new AbstractScheduleModel object. |
|
| Method Summary | |
protected ScheduleDay |
add(java.util.Date date)
Add a day to the schedule |
protected void |
clear()
Remove all days |
boolean |
containsDate(java.util.Date date)
Check if the schedule contains the specified date |
java.lang.Object |
get(int index)
Get the day at position index. |
int |
getMode()
|
java.util.Date |
getSelectedDate()
|
ScheduleEntry |
getSelectedEntry()
|
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
|
protected abstract void |
loadDayAttributes(Day day)
Load any attributes for this day: is it a working day or a holiday, and what is the name of the day (e.g. |
protected abstract java.util.Collection |
loadEntries(java.util.Date startDate,
java.util.Date endDate)
Load the schedule entries that fall between the startDate and the endDate. |
void |
refresh()
This refreshes the visible days of the model |
protected void |
setDay(java.util.Date date)
Set the day |
void |
setMode(int mode)
|
protected void |
setMonth(java.util.Date date)
navigate to the specified month |
void |
setSelectedDate(java.util.Date date)
|
void |
setSelectedEntry(ScheduleEntry selectedEntry)
|
protected void |
setWeek(java.util.Date date)
navigate to the specified week |
protected void |
setWorkWeek(java.util.Date date)
navigate to the specified workweek |
int |
size()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected final java.util.TreeSet days
| Constructor Detail |
public AbstractScheduleModel()
| Method Detail |
public boolean isEmpty()
isEmpty in interface ScheduleModelScheduleModel.isEmpty()public void setMode(int mode)
setMode in interface ScheduleModelmode - the mode: DAY, WORKWEEK, WEEK or MONTHScheduleModel.setMode(int)public int getMode()
getMode in interface ScheduleModelScheduleModel.getMode()public void setSelectedDate(java.util.Date date)
setSelectedDate in interface ScheduleModeldate - the date to selectScheduleModel.setSelectedDate(java.util.Date)public java.util.Date getSelectedDate()
getSelectedDate in interface ScheduleModelScheduleModel.getSelectedDate()public void setSelectedEntry(ScheduleEntry selectedEntry)
setSelectedEntry in interface ScheduleModelselectedEntry - the entry to selectScheduleModel.setSelectedEntry(org.apache.myfaces.custom.schedule.model.ScheduleEntry)public ScheduleEntry getSelectedEntry()
getSelectedEntry in interface ScheduleModelScheduleModel.getSelectedEntry()public boolean containsDate(java.util.Date date)
ScheduleModelCheck if the schedule contains the specified date
containsDate in interface ScheduleModeldate - the date to check
ScheduleModel.containsDate(java.util.Date)public java.lang.Object get(int index)
ScheduleModelGet the day at position index.
get in interface ScheduleModelindex - the index
ScheduleModel.get(int)public java.util.Iterator iterator()
iterator in interface ScheduleModelScheduleModel.iterator()public int size()
size in interface ScheduleModelScheduleModel.size()protected void setDay(java.util.Date date)
Set the day
date - the new dayprotected void setMonth(java.util.Date date)
navigate to the specified month
date - the date to navigate toprotected void setWeek(java.util.Date date)
navigate to the specified week
date - the date to navigate toprotected void setWorkWeek(java.util.Date date)
navigate to the specified workweek
date - the date to navigate toprotected ScheduleDay add(java.util.Date date)
Add a day to the schedule
protected void clear()
Remove all days
public void refresh()
This refreshes the visible days of the model
protected abstract java.util.Collection loadEntries(java.util.Date startDate,
java.util.Date endDate)
Load the schedule entries that fall between the startDate and the endDate.
startDate - 0 AM on the start dateendDate - 12 PM on the end dateprotected abstract void loadDayAttributes(Day day)
Load any attributes for this day: is it a working day or a holiday, and what is the name of the day (e.g. "Christmas").
day - the day that should be loaded
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||