Set a xsl:sort element associated with this element.

@param sortElem xsl:sort element to set
160897
public void setSortElem(ElemSort sortElem)
  {

    if (null == m_sortElems)
      m_sortElems = new Vector();

    m_sortElems.addElement(sortElem);
  }
363774
public void sort(DTMIterator v, Vector keys, XPathContext support)
          throws javax.xml.transform.TransformerException
  {

    m_keys = keys;

    // QuickSort2(v, 0, v.size() - 1 );
    int n = v.getLength();

    // %OPT% Change mergesort to just take a DTMIterator?
    // We would also have to adapt DTMIterator to have the function 
    // of NodeCompareElem.
    
    // Create a vector of node compare elements
    // based on the input vector of nodes
    Vector nodes = new Vector();

    for (int i = 0; i < n; i++)
    {
      NodeCompareElem elem = new NodeCompareElem(v.item(i));

      nodes.addElement(elem);
    }

    Vector scratchVector = new Vector();

    mergesort(nodes, scratchVector, 0, n - 1, support);

    // return sorted vector of nodes
    for (int i = 0; i < n; i++)
    {
      v.setItem(((NodeCompareElem) nodes.elementAt(i)).m_node, i);
    }
    v.setCurrentPos(0);

    // old code...
    //NodeVector scratchVector = new NodeVector(n);
    //mergesort(v, scratchVector, 0, n - 1, support);
  }
301491
public function setSortable($sortable, $sortable_flags = null)
    {
        $this->sortable = (bool) $sortable;
        $this->sortable_flags = $sortable_flags;

        return $this;
    }
255433
public function removeElement(OrderElement $elements)
    {
        $this->elements->removeElement($elements);
        $elements->setOrder(null);
    }
1371881
public synchronized void sortOnProperty(final Object value, final boolean ascending, final ValueStrategy strategy) {

        final int elementCount = size();

        for (int i = 0; i < elementCount - 1; i++) {

            for (int j = i + 1; j < elementCount; j++) {

                final T entry1 = get(i);
                final T entry2 = get(j);

                final EntryValue oc1 = strategy.getValue(entry1, value);
                final EntryValue oc2 = strategy.getValue(entry2, value);

                if (oc1 != oc2) {
                    final boolean bothNotNull = oc1 != null && oc2 != null;
                    if (ascending) {
                        if (oc2 == null || bothNotNull && oc2.compareTo(oc1) < 0) {
                            // swap entries
                            set(i, entry2);
                            set(j, entry1);
                        }
                    } else {
                        if (oc1 == null || bothNotNull && oc1.compareTo(oc2) < 0) {
                            // swap entries
                            set(i, entry2);
                            set(j, entry1);
                        }
                    }
                }
            }

        }

    }
138971
public DTMIterator sortNodes(
          XPathContext xctxt, Vector keys, DTMIterator sourceNodes)
            throws TransformerException
  {

    NodeSorter sorter = new NodeSorter(xctxt);
    sourceNodes.setShouldCacheNodes(true);
    sourceNodes.runTo(-1);
    xctxt.pushContextNodeList(sourceNodes);

    try
    {
      sorter.sort(sourceNodes, keys, xctxt);
      sourceNodes.setCurrentPos(0);
    }
    finally
    {
      xctxt.popContextNodeList();
    }

    return sourceNodes;
  }
439704
public void sort (Comparator<? super T> comp)
    {
        if (_size > 1) {
            QuickSort.sort(_elements, 0, _size-1, comp);
        }
    }
1086467
function (e) {
                var element = e.target;
                var sortableElement = element.isSortable === true ? element : findSortable(element);
                element = findDragElement(sortableElement, element);
                if (!dragging || !_listsConnected(sortableElement, dragging.parentElement) || addData(sortableElement, '_disabled') === 'true') {
                    return;
                }
                var options = addData(sortableElement, 'opts');
                if (parseInt(options.maxItems) && _filter(sortableElement.children, addData(sortableElement, 'items')).length >= parseInt(options.maxItems) && dragging.parentElement !== sortableElement) {
                    return;
                }
                e.preventDefault();
                e.stopPropagation();
                e.dataTransfer.dropEffect = store(sortableElement).getConfig('copy') === true ? 'copy' : 'move';
                debouncedDragOverEnter(sortableElement, element, e.pageY);
            }
1223320
function _setSelfCloseElem(elem, elemName, elemParams, elemArr, tmplRule, outputH) {
  if (/\/$/.test(elemName)) {
    elemName = elemName.substr(0, elemName.length - 1);
  }

  _setElem(elem, elemName, elemParams, elemArr, true, tmplRule, outputH);
}
518784
public void setSortMode(final SortMode sortMode) {
		getOrCreateComponentModel().sortMode = sortMode == null ? SortMode.NONE : sortMode;
	}
906373
public void sort(Comparator<T> sort) {
		ArrayList<T> tmp = new ArrayList<T>();
		
        for( Collection<T> page : pages ) {
			tmp.addAll(page);
		}
		setup(tmp, pageSize, sort);
	}
1179706
private static boolean parseXMLChildElems(Element elem, List<UNode> childUNodeList) {
        assert elem != null;
        assert childUNodeList != null;
       
        // Scan for Element nodes (there could be Comment and other nodes).
        boolean bDupNodeNames = false;
        Set<String> nodeNameSet = new HashSet<String>();
        NodeList nodeList = elem.getChildNodes();
        for (int index = 0; index < nodeList.getLength(); index++) {
            Node childNode = nodeList.item(index);
            if (childNode instanceof Element) {
                // Create the appropriate child UNode for this element.
                UNode childUNode = parseXMLElement((Element)childNode);
                childUNodeList.add(childUNode);
                if (nodeNameSet.contains(childUNode.getName())) {
                    bDupNodeNames = true;
                } else {
                    nodeNameSet.add(childUNode.getName());
                }
            }
        }
        return bDupNodeNames;
    }
196847
public void setSorting(boolean value) {
        model.setSortingCategories(value);
        model.setSortingProperties(value);
        sortButton.setSelected(value);
    }
360378
protected void moveValue(int step) {

        Element e = getElement();
        Element parent = e.getParent();
        List<Element> siblings = CmsXmlGenericWrapper.elements(parent);
        int idx = siblings.indexOf(e);
        int newIdx = idx + step;
        siblings.remove(idx);
        siblings.add(newIdx, e);
        m_index += step;
    }
806818
public void addSingletonCell(int element) {
        SortedSet<Integer> cell = new TreeSet<Integer>();
        cell.add(element);
        this.cells.add(cell);
    }
1348438
def do_sort_by(self, element, decl, pseudo):
        """"""
        if ',' in decl.value:
            css, flags = split(decl.value, ',')
        else:
            css = decl.value
            flags = None
        sort = css_to_func(serialize(css), serialize(flags or ''),
                           self.css_namespaces, self.state['lang'])
        step = self.state[self.state['current_step']]

        target = self.current_target()
        target.sort = sort
        target.lang = self.state['lang']
        target.isgroup = False
        target.groupby = None
        #  Find current target, set its sort as well
        for pos, action in \
                enumerate(reversed(step['actions'])):
            if action[0] == 'target' and \
                    action[1].tree == element.etree_element:
                action[1].sort = sort
                action[1].isgroup = False
                action[1].groupby = None
                break
765140
public void addToFirstChildren(XmlElement parent,Element child){
        List<Element> elements = parent.getElements();
        elements.add(0,child);
    }