code: 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();
                      }
                  }
              });
          }
  
      }
docs: Set the pattern scheme to either "by weekday" or "by day of month".
  @param isByWeekDay flag, indicating if the pattern "by weekday" should be set.
  @param fireChange flag, indicating if a value change event should be fired.