public CalendarItem getCalendarItem ( Rec fieldList ) { return new CalendarRecordItem ( this , - 1 , 0 , 1 , 2 , - 1 ) { public Object getIcon ( int iIconType ) { Record recProjectControl = getRecord ( ProjectControl . PROJECT_CONTROL_FILE ) ; ImageField field = null ; String fieldSeq = ( iIconType == CalendarConstants . START_ICON ) ? ProjectControl . START_PARENT_ICON : ProjectControl . END_PARENT_ICON ; if ( this . isParentTask ( ) ) field = ( ImageField ) recProjectControl . getField ( fieldSeq ) ; fieldSeq = ( iIconType == CalendarConstants . START_ICON ) ? ProjectControl . START_ICON : ProjectControl . END_ICON ; if ( ( field == null ) || ( field . isNull ( ) ) ) field = ( ImageField ) recProjectControl . getField ( fieldSeq ) ; if ( field . isNull ( ) ) return super . getIcon ( iIconType ) ; return field . getImage ( ) . getImage ( ) ; } public int getHighlightColor ( ) { Record recProjectControl = getRecord ( ProjectControl . PROJECT_CONTROL_FILE ) ; ColorField field = null ; if ( this . isParentTask ( ) ) field = ( ColorField ) recProjectControl . getField ( ProjectControl . PARENT_TASK_COLOR ) ; if ( ( field == null ) || ( field . isNull ( ) ) ) field = ( ColorField ) recProjectControl . getField ( ProjectControl . TASK_COLOR ) ; if ( field . isNull ( ) ) return super . getHighlightColor ( ) ; return field . getColor ( ) ; } public int getSelectColor ( ) { Record recProjectControl = getRecord ( ProjectControl . PROJECT_CONTROL_FILE ) ; ColorField field = null ; if ( this . isParentTask ( ) ) field = ( ColorField ) recProjectControl . getField ( ProjectControl . PARENT_TASK_SELECT_COLOR ) ; if ( ( field == null ) || ( field . isNull ( ) ) ) field = ( ColorField ) recProjectControl . getField ( ProjectControl . TASK_SELECT_COLOR ) ; if ( field . isNull ( ) ) return super . getSelectColor ( ) ; return field . getColor ( ) ; } public boolean isParentTask ( ) { return ( ( ProjectTask ) getMainRecord ( ) ) . isParentTask ( ) ; } } ; }
Get the CalendarItem for this record .