code: function(){
          var me = this,
              delay = me.saveDelay,
              statics, runner;
  
          if (!me.stateful) {
              return;
          }
  
          if (delay) {
              if (!me.stateTask) {
                  statics = Ext.state.Stateful;
                  runner = statics.runner || (statics.runner = new Ext.util.TaskRunner());
  
                  me.stateTask = runner.newTask({
                      run: me.saveState,
                      scope: me,
                      interval: delay,
                      repeat: 1
                  });
              }
  
              me.stateTask.start();
          } else {
              me.saveState();
          }
      }
docs: This method is called when any of the {@link #stateEvents} are fired.
  @private