public void setPatternScheme ( final boolean isByWeekDay , final boolean fireChange ) { if ( isByWeekDay ^ ( null != m_model . getWeekDay ( ) ) ) { removeExceptionsOnChange ( new Command ( ) { public void execute ( ) { if ( isByWeekDay ) { m_model . setWeekOfMonth ( getPatternDefaultValues ( ) . getWeekOfMonth ( ) ) ; m_model . setWeekDay ( getPatternDefaultValues ( ) . getWeekDay ( ) ) ; } else { m_model . clearWeekDays ( ) ; m_model . clearWeeksOfMonth ( ) ; m_model . setDayOfMonth ( getPatternDefaultValues ( ) . getDayOfMonth ( ) ) ; } m_model . setInterval ( getPatternDefaultValues ( ) . getInterval ( ) ) ; if ( fireChange ) { onValueChange ( ) ; } } } ) ; } }
Set the pattern scheme to either by weekday or by day of month .