|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectscheduler.view.CalendarView
public class CalendarView
Field Summary | |
---|---|
protected java.util.ArrayList<CalColumn> |
calColumnList
List of CalColumn for selected days in AF |
protected CalendarViewUI |
calViewUI
The companion view object. |
protected int[] |
dayNumCol
the number indicate number of col needed for that day more than 1 col means there is an overlapping calendar cell for that day |
(package private) static java.lang.String[] |
daysList
|
protected int |
endTime
Time obj representing the time range in calendar view |
protected FilterOptions |
filterOptions
FilterOptions for the view. |
protected java.util.ArrayList<ScheduleItem> |
friItem
List contain all ScheduleItem for Friday |
protected java.util.ArrayList<CalColumn> |
fullColumnList
List of CalColumn for EVERDAY, Mon - Sun |
protected java.util.ArrayList<ScheduleItem> |
monItem
List contain all ScheduleItem for Monday |
protected int |
numDaysInWeek
number of days in a weekly view or 1 for a daily view, indicate number of cols |
protected int |
numHour
number of hours in a day, indicate number of rows |
protected java.util.ArrayList<ScheduleItem> |
satItem
List contain all ScheduleItem for Saturday |
protected Schedule |
schedule
The Schedule to be drawn. |
protected java.util.ArrayList<ScheduleItem> |
siList
List of Selected ScheduleItem |
protected int |
startTime
Time obj representing the time range in calendar view |
protected java.util.ArrayList<ScheduleItem> |
sunItem
List contain all ScheduleItem for Sunday |
protected java.util.ArrayList<ScheduleItem> |
thuItem
List contain all ScheduleItem for Thursday |
(package private) static java.lang.String[] |
timeList
|
protected int |
totalNumCol
Number of Column needed |
protected java.util.ArrayList<ScheduleItem> |
tueItem
List contain all ScheduleItem for Tuesday |
protected View |
view
The parent view. |
protected java.util.ArrayList<ScheduleItem> |
wedItem
List contain all ScheduleItem for Wednesday |
Constructor Summary | |
---|---|
CalendarView()
Constructor for testing the getDayInt method |
|
CalendarView(Schedule schedule)
Construct this class using its parent view object. |
Method Summary | |
---|---|
protected int |
calcNumDaysInWeek()
Calculate number of column to display in calendar view If daily view is selected, this method will return 1 |
protected int |
calcTime(int i)
Converting a time object to an int which correspond to the String of time, timeList |
protected int |
calcTime(Time t)
Converting a time object to an int which correspond to the String of time, timeList |
void |
callCreateCalCell()
Calling createCalCell() for EVERY DAY. |
int |
countHour(Time startHr,
Time endHr)
Count how many hours are in between the first parameter and the 2nd param. |
void |
createCalCell(DaysInWeek.Day d,
java.util.ArrayList<ScheduleItem> list,
int ind)
create CalCell object containing scheduleItem(s) for the particular CalColumn in fullColumnList determined from ind parameter. |
protected void |
createCourseSchedule()
create siList for the selected scheduleItems for course view |
protected void |
createInstructorSchedule()
create siList for the selected scheduleItems for instructor view |
protected void |
createLocationSchedule()
create siList for the selected scheduleItems for location view |
void |
createSchedule()
create siList for the selected scheduleItems |
java.util.ArrayList<CalColumn> |
getCalColumnList()
return the calColumnList which contains a list of CalColumn obj for each column/day in the calendar view. |
CalendarViewUI |
getCalViewUI()
return the CalendarViewUI obj |
int |
getDayInt(DaysInWeek.Day d)
return the day for daily calendar view in integer format Pre: d != null && (d == MON || d == TUE || d == WED || d == THU || d == FRI || d == SAT || d == SUN) Post: return == 0 if d == MON retirn == 1 if d == TUE return == 2 if d == WED return == 3 if d == THU return == 4 if d == FRI return == 5 if d == SAT return == 6 if d == SUN return == -1 if d== null or invalid |
static int |
getDayIntTest(DaysInWeek.Day d)
For testing return the day for daily calendar view in integer format Pre: d != null && (d == MON || d == TUE || d == WED || d == THU || d == FRI || d == SAT || d == SUN) Post: return == 0 if d == MON retirn == 1 if d == TUE return == 2 if d == WED return == 3 if d == THU return == 4 if d == FRI return == 5 if d == SAT return == 6 if d == SUN return == -1 if d== null or invalid |
int[] |
getDayNumCol()
Return dayNumCol array |
int |
getEndTimeInt()
Return the end time in integer |
int |
getNumDaysInWeek()
Return the current numDaysInWeek |
int |
getNumHourTotal()
Return the number of hours |
java.util.ArrayList<ScheduleItem> |
getSchedule()
return the list ofScheduleItem containing selected the scheduleItems |
int |
getStartTimeInt()
Return the start time in integer |
int |
getTotalNumCol()
Return totalNumCol |
void |
printCalendarView()
Print the Calendar View |
void |
sortScheduleItem()
categorize EVERY scheduleItem in Schedule by days then in each day category, group each item by its start time and end time. |
void |
update()
Update Calendar View components when View received observable notification |
void |
updateCalColumn()
Adding CalColumn object to the calColumnList if that column(day) is selected in AF |
void |
updateData()
update numDaysInWeek, startTime, endTime, and numHour corresponding to the Advanced Filter settings and user's selections |
void |
updateLabel()
Update the JLabel for each Calendar Cell |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Schedule schedule
protected java.util.ArrayList<ScheduleItem> siList
protected View view
protected CalendarViewUI calViewUI
protected FilterOptions filterOptions
protected int numDaysInWeek
protected int startTime
protected int endTime
protected int numHour
protected java.util.ArrayList<CalColumn> calColumnList
protected java.util.ArrayList<CalColumn> fullColumnList
protected java.util.ArrayList<ScheduleItem> monItem
protected java.util.ArrayList<ScheduleItem> tueItem
protected java.util.ArrayList<ScheduleItem> wedItem
protected java.util.ArrayList<ScheduleItem> thuItem
protected java.util.ArrayList<ScheduleItem> friItem
protected java.util.ArrayList<ScheduleItem> satItem
protected java.util.ArrayList<ScheduleItem> sunItem
protected int[] dayNumCol
protected int totalNumCol
static final java.lang.String[] daysList
static final java.lang.String[] timeList
Constructor Detail |
---|
public CalendarView()
public CalendarView(Schedule schedule)
Method Detail |
---|
public void createSchedule()
protected void createCourseSchedule()
protected void createInstructorSchedule()
protected void createLocationSchedule()
public void update()
public void updateLabel()
public void updateCalColumn()
public void callCreateCalCell()
public void createCalCell(DaysInWeek.Day d, java.util.ArrayList<ScheduleItem> list, int ind)
list
- - list of scheduleItem for particular column/dayind
- - the column number or index in fullColumnListpublic void printCalendarView()
public void sortScheduleItem()
public void updateData()
public int countHour(Time startHr, Time endHr)
startHr
- - the beginning of the hourendHr
- - the ending of the hour
protected int calcNumDaysInWeek()
protected int calcTime(int i)
i
- - 0 if converting for start time, 1 for end time
protected int calcTime(Time t)
t
- - the time object to be converted
public int getDayInt(DaysInWeek.Day d)
public static int getDayIntTest(DaysInWeek.Day d)
public java.util.ArrayList<CalColumn> getCalColumnList()
public java.util.ArrayList<ScheduleItem> getSchedule()
public CalendarViewUI getCalViewUI()
public int getNumDaysInWeek()
public int getStartTimeInt()
public int getEndTimeInt()
public int getNumHourTotal()
public int[] getDayNumCol()
public int getTotalNumCol()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |