|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jp.comp.calendar.CalendarControllerAdapter
CalendarController
is a base abstract class implementing CalendarController
's
method selectionChanged
and adding a fwe new methods to implement some basic logic
for navigation
CalendarInterface
,
CalendarPanel
,
MonthCalendarPanel
,
MultipleMonthCalendarPanel
,
DateField
Field Summary | |
protected java.util.Calendar |
fCalendar
The calendar to to date calculations |
protected int |
fColumn
The new columns |
protected int |
fDay
The new day |
protected int |
fMonthType
The new month type |
protected int |
fRow
The new row |
Fields inherited from interface com.jp.comp.calendar.CalendarController |
NAVIGATION_MONTH, NAVIGATION_WEEK, NAVIGATION_YEAR, SELECTION_COLUMN_CHANGED, SELECTION_DOWN_ARROW_PRESSED, SELECTION_LEFT_ARROW_PRESSED, SELECTION_RIGHT_ARROW_PRESSED, SELECTION_ROW_CHANGED, SELECTION_ROW_COLUMN_CHANGED, SELECTION_SHIFT_TAB_PRESSED, SELECTION_TAB_PRESSED, SELECTION_UP_ARROW_PRESSED |
Constructor Summary | |
CalendarControllerAdapter()
|
Method Summary | |
protected void |
currentMonthSelection(CalendarPanel aCalendarPanel,
int aSelection)
Does selection for current month. |
protected void |
determineSelection(CalendarPanel aCalendarPanel,
int aRow,
int aColumn,
int aSelection)
Determines selection using aRow , aColumn and aSelection and
determines new values for fRow |
protected abstract void |
nextMonthSelection(CalendarPanel aCalendarPanel,
int aSelection)
Does selection for previous month |
protected abstract void |
previousMonthSelection(CalendarPanel aCalendarPanel,
int aSelection)
Does selection for previous month |
void |
selectionChanged(CalendarPanel aCalendarPanel,
int aRow,
int aColumn,
int aSelection)
Invoked by the CalendarPanel when selection is changed by mouse or keyboard
to perform navigation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.jp.comp.calendar.CalendarController |
next, previous |
Field Detail |
protected java.util.Calendar fCalendar
protected int fDay
protected int fMonthType
protected int fRow
protected int fColumn
Constructor Detail |
public CalendarControllerAdapter()
Method Detail |
public void selectionChanged(CalendarPanel aCalendarPanel, int aRow, int aColumn, int aSelection)
CalendarPanel
when selection is changed by mouse or keyboard
to perform navigation.
This method invokes evaluateSelection
method to evaluate current selection and then
invokes a proper method for obtained fMonthType
selectionChanged
in interface CalendarController
aCalendarPanel
- the instance of the CalendarPanel
aRow
- current or selected row (depending on the type of selection)aColumn
- current or selected column (depending on the type of selection)aSelection
- selection key#evaluateSelection
,
#currentMonth
,
#previousMonth
,
#nextMonth
protected void determineSelection(CalendarPanel aCalendarPanel, int aRow, int aColumn, int aSelection)
aRow
, aColumn
and aSelection
and
determines new values for fRow, fColumn, fDay and
fMonthType
- Parameters:
aCalendarPanel
- the instance of the CalendarPanel
aRow
- current or selected row (depending on the type of selection)aColumn
- current or selected column (depending on the type of selection)aSelection
- selection key
protected void currentMonthSelection(CalendarPanel aCalendarPanel, int aSelection)
fDay
to aCalendarPanel
by the method
setDayOfMonth
aCalendarPanel
- the instance of the CalendarPanel
aSelection
- selection keyprotected abstract void previousMonthSelection(CalendarPanel aCalendarPanel, int aSelection)
aCalendarPanel
- the instance of the CalendarPanel
aSelection
- selection keyprotected abstract void nextMonthSelection(CalendarPanel aCalendarPanel, int aSelection)
aCalendarPanel
- the instance of the CalendarPanel
aSelection
- selection key
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |