Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="exml:ext.dd" xmlns:ed="exml:ext.dd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:exml="http://www.jangaroo.net/exml/0.8" xmlns:eu="exml:ext.util" >
  <xs:import namespace="http://www.jangaroo.net/exml/0.8"/>
  <xs:import namespace="exml:ext.util"/>
  <xs:complexType name='DragSource_TYPE'>
        <xs:sequence>
        </xs:sequence>
        <xs:attribute type='exml:String' name='ddGroup'>
          <xs:annotation>
            <xs:documentation>
              A named drag drop group to which this object belongs. If a group is specified, then this object will only interact with other drag drop objects in the same group (defaults to undefined).
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute type='exml:String' name='dropAllowed'>
          <xs:annotation>
            <xs:documentation>
              The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok").
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute type='exml:String' name='dropNotAllowed'>
          <xs:annotation>
            <xs:documentation>
              The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop").
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:anyAttribute namespace="http://www.jangaroo.net/exml/0.8 exml:untyped" processContents="skip"/>
  </xs:complexType>
  <xs:element name='DragSource' type='ed:DragSource_TYPE'>
    <xs:annotation>
      <xs:documentation>
        A simple class that provides the basic implementation needed to make any element draggable. <p>This class serves as a typed config object for constructor of class DragSource.</p> <p>Copyright &#169; 2011 Sencha Inc.</p> @see ext.dd.DragSource
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name='DragTracker_TYPE'>
    <xs:complexContent>
      <xs:extension base='eu:Observable_TYPE'>
        <xs:sequence>
            <xs:element name='autoStart' minOccurs="0" maxOccurs="1">
              <xs:annotation>
                <xs:documentation>
                  Defaults to <tt>false</tt>. Specify <tt>true</tt> to defer trigger start by 1000 ms. Specify a Number for the number of milliseconds to defer trigger start.
                </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
                </xs:sequence>
                <xs:anyAttribute processContents="skip"/>
              </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute type='exml:Boolean' name='active'>
          <xs:annotation>
            <xs:documentation>
              Defaults to <tt>false</tt>.
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute type='exml:String' name='autoStart'>
          <xs:annotation>
            <xs:documentation>
              Defaults to <tt>false</tt>. Specify <tt>true</tt> to defer trigger start by 1000 ms. Specify a Number for the number of milliseconds to defer trigger start.
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute type='exml:Number' name='tolerance'>
          <xs:annotation>
            <xs:documentation>
              Number of pixels the drag target must be moved before dragging is considered to have started. Defaults to <tt>5</tt>.
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:anyAttribute namespace="http://www.jangaroo.net/exml/0.8 exml:untyped" processContents="skip"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name='DragTracker' type='ed:DragTracker_TYPE' substitutionGroup='eu:Observable'>
    <xs:annotation>
      <xs:documentation>
        A DragTracker listens for drag events on an Element and fires events at the start and end of the drag, as well as during the drag. This is useful for components such as <a href="Ext.slider.MultiSlider.html">Ext.slider.MultiSlider</a>, where there is an element that can be dragged around to change the Slider's value. DragTracker provides a series of template methods that should be overridden to provide functionality in response to detected drag operations. These are onBeforeStart, onStart, onDrag and onEnd. See <a href="Ext.slider.MultiSlider.html">Ext.slider.MultiSlider</a>'s initEvents function for an example implementation. <p>This class serves as a typed config object for constructor of class DragTracker.</p> <p>Copyright &#169; 2011 Sencha Inc.</p> @see ext.dd.DragTracker
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name='DragZone_TYPE'>
    <xs:complexContent>
      <xs:extension base='ed:DragSource_TYPE'>
        <xs:sequence>
        </xs:sequence>
        <xs:attribute type='exml:Boolean' name='containerScroll'>
          <xs:annotation>
            <xs:documentation>
              True to register this container with the Scrollmanager for auto scrolling during drag operations.
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute type='exml:String' name='hlColor'>
          <xs:annotation>
            <xs:documentation>
              The color to use when visually highlighting the drag source in the afterRepair method after a failed drop (defaults to "c3daf9" - light blue)
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:anyAttribute namespace="http://www.jangaroo.net/exml/0.8 exml:untyped" processContents="skip"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name='DragZone' type='ed:DragZone_TYPE' substitutionGroup='ed:DragSource'>
    <xs:annotation>
      <xs:documentation>
        This class provides a container DD instance that allows dragging of multiple child source nodes. <p>This class does not move the drag target nodes, but a proxy element which may contain any DOM structure you wish. The DOM element to show in the proxy is provided by either a provided implementation of <a href="output/Ext.dd.DragZone.html#Ext.dd.DragZone-getDragData">getDragData</a>, or by registered draggables registered with <a href="Ext.dd.Registry.html">Ext.dd.Registry</a></p><p>If you wish to provide draggability for an arbitrary number of DOM nodes, each of which represent some application object (For example nodes in a <a href="Ext.DataView.html">DataView</a>) then use of this class is the most efficient way to "activate" those nodes.</p><p>By default, this class requires that draggable child nodes are registered with <a href="Ext.dd.Registry.html">Ext.dd.Registry</a>. However a simpler way to allow a DragZone to manage any number of draggable elements is to configure the DragZone with an implementation of the <a href="output/Ext.dd.DragZone.html#Ext.dd.DragZone-getDragData">getDragData</a> method which interrogates the passed mouse event to see if it has taken place within an element, or class of elements. This is easily done by using the event's <a href="output/Ext.EventObject.html#Ext.EventObject-getTarget">getTarget</a> method to identify a node based on a <a href="Ext.DomQuery.html">Ext.DomQuery</a> selector. For example, to make the nodes of a DataView draggable, use the following technique. Knowledge of the use of the DataView is required:</p><pre><code>myDataView.on('render', function(v) { myDataView.dragZone = new Ext.dd.DragZone(v.getEl(), { // On receipt of a mousedown event, see if it is within a DataView node. // Return a drag data object if so. getDragData: function(e) { // Use the DataView's own itemSelector (a mandatory property) to // test if the mousedown is within one of the DataView's nodes. var sourceEl = e.getTarget(v.itemSelector, 10); // If the mousedown is within a DataView node, clone the node to produce // a ddel element for use by the drag proxy. Also add application data // to the returned data object. if (sourceEl) { d = sourceEl.cloneNode(true); d.id = Ext.id(); return { ddel: d, sourceEl: sourceEl, repairXY: Ext.fly(sourceEl).getXY(), sourceStore: v.store, draggedRecord: v.<a href="output/Ext.DataView.html#Ext.DataView-getRecord">getRecord</a>(sourceEl) } } }, // Provide coordinates for the proxy to slide back to on failed drag. // This is the original XY coordinates of the draggable element captured // in the getDragData method. getRepairXY: function() { return this.dragData.repairXY; } }); });</code></pre>See the <a href="Ext.dd.DropZone.html">DropZone</a> documentation for details about building a DropZone which cooperates with this DragZone. <p>This class serves as a typed config object for constructor of class DragZone.</p> <p>Copyright &#169; 2011 Sencha Inc.</p> @see ext.dd.DragZone
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name='DropTarget_TYPE'>
        <xs:sequence>
        </xs:sequence>
        <xs:attribute type='exml:String' name='ddGroup'>
          <xs:annotation>
            <xs:documentation>
              A named drag drop group to which this object belongs. If a group is specified, then this object will only interact with other drag drop objects in the same group (defaults to undefined).
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute type='exml:String' name='dropAllowed'>
          <xs:annotation>
            <xs:documentation>
              The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok").
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute type='exml:String' name='dropNotAllowed'>
          <xs:annotation>
            <xs:documentation>
              The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop").
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute type='exml:String' name='overClass'>
          <xs:annotation>
            <xs:documentation>
              The CSS class applied to the drop target element while the drag source is over it (defaults to "").
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:anyAttribute namespace="http://www.jangaroo.net/exml/0.8 exml:untyped" processContents="skip"/>
  </xs:complexType>
  <xs:element name='DropTarget' type='ed:DropTarget_TYPE'>
    <xs:annotation>
      <xs:documentation>
        A simple class that provides the basic implementation needed to make any element a drop target that can have draggable items dropped onto it. The drop has no effect until an implementation of notifyDrop is provided. <p>This class serves as a typed config object for constructor of class DropTarget.</p> <p>Copyright &#169; 2011 Sencha Inc.</p> @see ext.dd.DropTarget
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name='DropZone_TYPE'>
    <xs:complexContent>
      <xs:extension base='ed:DropTarget_TYPE'>
        <xs:sequence>
        </xs:sequence>
        <xs:anyAttribute namespace="http://www.jangaroo.net/exml/0.8 exml:untyped" processContents="skip"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name='DropZone' type='ed:DropZone_TYPE' substitutionGroup='ed:DropTarget'>
    <xs:annotation>
      <xs:documentation>
        This class provides a container DD instance that allows dropping on multiple child target nodes. <p>By default, this class requires that child nodes accepting drop are registered with <a href="Ext.dd.Registry.html">Ext.dd.Registry</a>. However a simpler way to allow a DropZone to manage any number of target elements is to configure the DropZone with an implementation of <a href="output/Ext.dd.DropZone.html#Ext.dd.DropZone-getTargetFromEvent">getTargetFromEvent</a> which interrogates the passed mouse event to see if it has taken place within an element, or class of elements. This is easily done by using the event's <a href="output/Ext.EventObject.html#Ext.EventObject-getTarget">getTarget</a> method to identify a node based on a <a href="Ext.DomQuery.html">Ext.DomQuery</a> selector.</p><p>Once the DropZone has detected through calling getTargetFromEvent, that the mouse is over a drop target, that target is passed as the first parameter to <a href="output/Ext.dd.DropZone.html#Ext.dd.DropZone-onNodeEnter">onNodeEnter</a>, <a href="output/Ext.dd.DropZone.html#Ext.dd.DropZone-onNodeOver">onNodeOver</a>, <a href="output/Ext.dd.DropZone.html#Ext.dd.DropZone-onNodeOut">onNodeOut</a>, <a href="output/Ext.dd.DropZone.html#Ext.dd.DropZone-onNodeDrop">onNodeDrop</a>. You may configure the instance of DropZone with implementations of these methods to provide application-specific behaviour for these events to update both application state, and UI state.</p><p>For example to make a GridPanel a cooperating target with the example illustrated in <a href="Ext.dd.DragZone.html">DragZone</a>, the following technique might be used:</p><pre><code>myGridPanel.on('render', function() { myGridPanel.dropZone = new Ext.dd.DropZone(myGridPanel.getView().scroller, { // If the mouse is over a grid row, return that node. This is // provided as the "target" parameter in all "onNodeXXXX" node event handling functions getTargetFromEvent: function(e) { return e.getTarget(myGridPanel.getView().rowSelector); }, // On entry into a target node, highlight that node. onNodeEnter : function(target, dd, e, data){ Ext.fly(target).addClass('my-row-highlight-class'); }, // On exit from a target node, unhighlight that node. onNodeOut : function(target, dd, e, data){ Ext.fly(target).removeClass('my-row-highlight-class'); }, // While over a target node, return the default drop allowed class which // places a "tick" icon into the drag proxy. onNodeOver : function(target, dd, e, data){ return Ext.dd.DropZone.prototype.dropAllowed; }, // On node drop we can interrogate the target to find the underlying // application object that is the real target of the dragged data. // In this case, it is a Record in the GridPanel's Store. // We can use the data set up by the DragZone's getDragData method to read // any data we decided to attach in the DragZone's getDragData method. onNodeDrop : function(target, dd, e, data){ var rowIndex = myGridPanel.getView().findRowIndex(target); var r = myGridPanel.getStore().getAt(rowIndex); Ext.Msg.alert('Drop gesture', 'Dropped Record id ' + data.draggedRecord.id + ' on Record id ' + r.id); return true; } }); } </code></pre>See the <a href="Ext.dd.DragZone.html">DragZone</a> documentation for details about building a DragZone which cooperates with this DropZone. <p>This class serves as a typed config object for constructor of class DropZone.</p> <p>Copyright &#169; 2011 Sencha Inc.</p> @see ext.dd.DropZone
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name='PanelProxy_TYPE'>
        <xs:sequence>
        </xs:sequence>
        <xs:attribute type='exml:Boolean' name='insertProxy'>
          <xs:annotation>
            <xs:documentation>
              True to insert a placeholder proxy element while dragging the panel, false to drag with no proxy (defaults to true).
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:anyAttribute namespace="http://www.jangaroo.net/exml/0.8 exml:untyped" processContents="skip"/>
  </xs:complexType>
  <xs:element name='PanelProxy' type='ed:PanelProxy_TYPE'>
    <xs:annotation>
      <xs:documentation>
        A custom drag proxy implementation specific to <a href="Ext.Panel.html">Ext.Panel</a>s. This class is primarily used internally for the Panel's drag drop implementation, and should never need to be created directly. <p>This class serves as a typed config object for constructor of class PanelProxy.</p> <p>Copyright &#169; 2011 Sencha Inc.</p> @see ext.dd.PanelProxy
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name='StatusProxy_TYPE'>
        <xs:sequence>
        </xs:sequence>
        <xs:attribute type='exml:String' name='dropAllowed'>
          <xs:annotation>
            <xs:documentation>
              The CSS class to apply to the status element when drop is allowed (defaults to "x-dd-drop-ok").
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute type='exml:String' name='dropNotAllowed'>
          <xs:annotation>
            <xs:documentation>
              The CSS class to apply to the status element when drop is not allowed (defaults to "x-dd-drop-nodrop").
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:anyAttribute namespace="http://www.jangaroo.net/exml/0.8 exml:untyped" processContents="skip"/>
  </xs:complexType>
  <xs:element name='StatusProxy' type='ed:StatusProxy_TYPE'>
    <xs:annotation>
      <xs:documentation>
        A specialized drag proxy that supports a drop status icon, <a href="Ext.Layer.html">Ext.Layer</a> styles and auto-repair. This is the default drag proxy used by all Ext.dd components. <p>This class serves as a typed config object for constructor of class StatusProxy.</p> <p>Copyright &#169; 2011 Sencha Inc.</p> @see ext.dd.StatusProxy
      </xs:documentation>
    </xs:annotation>
  </xs:element>
</xs:schema>
New to GrepCode? Check out our FAQ X