/** Moves down. Performs differently according to * immediateReorder property value. */ private void moveDown(final int position) { if (index == null) { return; } if (immediateReorder) { index.moveDown(position); } else { getPermutation(); int temp = permutation[position]; permutation[position] = permutation[position + 1]; permutation[position + 1] = temp; } }
public void moveDown(int i) { indexSupport.moveDown(i); }
/** Moves down. Performs differently according to * immediateReorder property value. */ private void moveDown (final int position) { if (index == null) return; if (immediateReorder) { index.moveDown(position); } else { getPermutation(); int temp = permutation[position]; permutation[position] = permutation[position + 1]; permutation[position + 1] = temp; } }
/** Moves down. Performs differently according to * immediateReorder property value. */ private void moveDown (final int position) { if (index == null) return; if (immediateReorder) { index.moveDown(position); } else { getPermutation(); int temp = permutation[position]; permutation[position] = permutation[position + 1]; permutation[position + 1] = temp; } }
private void moveDown (Node[] nodes) { assert nodes != null : "Nodes to moveDown cannot be null."; assert nodes.length == 1 : "Only one node can be moveDown, not " + Arrays.asList (nodes); assert nodes [0].isLeaf () : "Only leaf node can be moveDown, not " + nodes [0]; Node n = nodes [0]; Index supp = getIndexSupport (n); int origPos = getNodePosition (n); // workaround issue 62192, don't try to move on broken index if (origPos == -1) { return ; } supp.moveDown (origPos); // getNodePosition() is not really reliable here. // assert origPos + 1 == getNodePosition (n) : "Node " + n + " has been moved from " + origPos + " to pos " + getNodePosition (n); }
protected void performAction (Node[] activatedNodes) { // we need to check activatedNodes, because there's no // guarantee that they not changed between enable() and // performAction calls Index cookie = getIndexCookie(activatedNodes); if (cookie == null) return; int nodeIndex = cookie.indexOf(activatedNodes[0]); if ((nodeIndex >= 0) && (nodeIndex < (cookie.getNodesCount() - 1))) { cookie.moveDown(nodeIndex); } }
protected void performAction (Node[] activatedNodes) { // we need to check activatedNodes, because there's no // guarantee that they not changed between enable() and // performAction calls Index cookie = getIndexCookie(activatedNodes); if (cookie == null) return; int nodeIndex = cookie.indexOf(activatedNodes[0]); if ((nodeIndex >= 0) && (nodeIndex < (cookie.getNodesCount() - 1))) { cookie.moveDown(nodeIndex); } }