code: function() {
          var control = this;
          this.dragControl = new OpenLayers.Control.DragFeature(this.layer, {
              documentDrag: true,
              // avoid moving the feature itself - move the box instead
              moveFeature: function(pixel) {
                  if(this.feature === control.feature) {
                      this.feature = control.box;
                  }
                  OpenLayers.Control.DragFeature.prototype.moveFeature.apply(this,
                      arguments);
              },
              // transform while dragging
              onDrag: function(feature, pixel) {
                  if(feature === control.box) {
                      control.transformFeature({center: control.center});
                  }
              },
              // set a new feature
              onStart: function(feature, pixel) {
                  var eligible = !control.geometryTypes ||
                      OpenLayers.Util.indexOf(control.geometryTypes,
                          feature.geometry.CLASS_NAME) !== -1;
                  var i = OpenLayers.Util.indexOf(control.handles, feature);
                  i += OpenLayers.Util.indexOf(control.rotationHandles,
                      feature);
                  if(feature !== control.feature && feature !== control.box &&
                                                          i == -2 && eligible) {
                      control.setFeature(feature);
                  }
              },
              onComplete: function(feature, pixel) {
                  control.events.triggerEvent("transformcomplete",
                      {feature: control.feature});
              }
          });
      }
docs: Method: createControl
  Creates a DragFeature control for this control.