@param int $focusLeft
@param int $focusTop

@return Focus
966013
public function setFocus($focusLeft, $focusTop)
    {
        $this->focusLeft = $focusLeft;
        $this->focusTop = $focusTop;

        return $this;
    }
465487
public function GetSPLF($SplfName , $SplfNbr, $JobNmbr, $JobName, $JobUser, $TMPFName='')
    {
        $this->clearError();
        if ($TMPFName != '') {
            $this->TMPFName = $TMPFName;
        }

        // @todo under the flag for current Object???
        $crtf = "CRTDUPOBJ OBJ(ZSF255) FROMLIB(" . $this->ToolkitSrvObj->getOption('HelperLib') . ") OBJTYPE(*FILE) TOLIB($this->TmpLib) NEWOBJ($this->TMPFName)";
        $this->ToolkitSrvObj->ClCommandWithCpf($crtf); // was ClCommand

        // clear the temp file
        $clrpfm = "CLRPFM $this->TmpLib/$this->TMPFName";
        $this->ToolkitSrvObj->ClCommandWithCpf($clrpfm); // these all were CLCommand but we need CPFs.

        // copy spooled file to temp file
        $cmd = sprintf ("CPYSPLF FILE(%s) TOFILE($this->TmpLib/$this->TMPFName) JOB(%s/%s/%s) SPLNBR(%s)",
            $SplfName, trim($JobNmbr), trim($JobUser), trim($JobName), $SplfNbr);

        $this->ToolkitSrvObj->ClCommandWithCpf($cmd);
        sleep(1);
        // read the data from temp file
        $Txt = $this->ReadSPLFData();

        // delete temp file
        $dltf   = "DLTF FILE($this->TmpLib/$this->TMPFName)";
        $this->ToolkitSrvObj->ClCommandWithCpf($dltf);

        return $Txt;
    }
1004814
protected function updateNode($destLeft)
    {
        $left = $this->getLeftValue();
        $right = $this->getRightValue();
        $root = $this->hasManyRoots() ? $this->getRootValue() : null;

        $treeSize = $right - $left + 1;

        // Make room in the new branch
        $this->shiftRLRange($destLeft, 0, $treeSize, $root);

        if($left >= $destLeft)
        {
            // src was shifted too
            $left += $treeSize;
            $right += $treeSize;
        }

        // Now there's enough room next to target to move the subtree
        $this->shiftRLRange($left, $right, $destLeft - $left, $root);

        // Correct values after source (close gap in old tree)
        $this->shiftRLRange($right + 1, 0, -$treeSize, $root);
    }
1300405
function () {
            var data = this._subTplModuleCtrl.getData();
            var toFocus = data.itemsView.items[data.focusIndex].initIndex;
            if (data.items[toFocus].currentlyDisabled) {
                data.focusIndex = this._getFirstEnabledItem().id;
            }
            this._subTplModuleCtrl.setFocus();
        }
1063025
protected static function pushLeft(&$context) {
        $L = $context['currentToken'][Token::POS_LOTHER] . $context['currentToken'][Token::POS_LSPACE];

        if ($context['currentToken'][Token::POS_OP] === '!') {
            $appender = function (&$pb) use ($L) {
                $pb .= $L;
            };
            if (count($context['partialblock']) > 0) {
                array_walk($context['partialblock'], $appender);
            }
            if (count($context['inlinepartial']) > 0) {
                array_walk($context['inlinepartial'], $appender);
            }
        }

        static::pushToken($context, $L);
        $context['currentToken'][Token::POS_LOTHER] = $context['currentToken'][Token::POS_LSPACE] = '';
    }
753697
function reflexLeft(left, p, i0, i1) {
    for(var i=i1; i>i0; --i) {
      var a = left[i-1]
      var b = left[i]
      if(orient(a, b, p) <= 0) {
        cells.push([a[2], b[2], p[2]])
      } else {
        return i
      }
    }
    return i0
  }
816985
public function getOrderArticles($blExcludeCanceled = false)
    {
        // checking set value
        if ($blExcludeCanceled) {
            return $this->_getArticles(true);
        } elseif ($this->_oArticles === null) {
            $this->_oArticles = $this->_getArticles();
        }

        return $this->_oArticles;
    }
423695
private void setToolTipPosition(int clientLeft, int clientTop) {

        if (m_toolTip != null) {
            int height = m_toolTip.getOffsetHeight();
            int width = m_toolTip.getOffsetWidth();
            int windowHeight = Window.getClientHeight();
            int windowWidth = Window.getClientWidth();
            int scrollLeft = Window.getScrollLeft();
            int scrollTop = Window.getScrollTop();
            int left = clientLeft + scrollLeft + m_offsetLeft;
            if ((left + width) > (windowWidth + scrollLeft)) {
                left = (windowWidth + scrollLeft) - m_offsetLeft - width;
            }
            m_toolTip.getStyle().setLeft(left, Unit.PX);
            int top = clientTop + scrollTop + m_offsetTop;
            if (((top + height) > (windowHeight + scrollTop)) && ((height + m_offsetTop) < clientTop)) {
                top = (clientTop + scrollTop) - m_offsetTop - height;
            }
            m_toolTip.getStyle().setTop(top, Unit.PX);
        }
    }
804116
public static function smrtr($haystack, $aMatch, $aDelimiter = array("{","}")) {
        $aCleaned = array();

        foreach ($aMatch as $key => $v) {
            $aCleaned[$aDelimiter[0].$key.$aDelimiter[1]] = $v;
        }

        return strtr($haystack, $aCleaned);
    }
554293
public function enableAutofocus()
    {
        static $enabled = false;
        
        if (!$enabled) {
            $script = "$(document).ready(function(){"
                    . "\$(this).find('[autofocus]:first').focus();"
                    . "});";
            $this->registerScript($script);
            $enabled = true;
        }
        
        return $this;
    }
1135758
public function perform($targetDocument)
    {
        $pointer = new Pointer($targetDocument);
        $rootGet = array();
        $value = $this->getValue();

        try {
            $get = $pointer->get($this->getPath());
        } catch (NonexistentValueReferencedException $e) {
            $get = null;
        }

        $pointerParts = $this->getPointerParts();

        $rootPointer = $pointerParts[0];

        if (count($pointerParts) >= 2) {
            try {
                $rootGet = $pointer->get(Pointer::POINTER_CHAR . implode('/', array_slice($pointerParts, 0, -1)));
            } catch (NonexistentValueReferencedException $e) {
                return $targetDocument;
            }
        }

        $targetDocument = json_decode($targetDocument);

        $lastPointerPart = $pointerParts[count($pointerParts) - 1];
        $replacementValue = $this->getReplacementValue();

        if ($get === null && $lastPointerPart !== Pointer::LAST_ARRAY_ELEMENT_CHAR) {
            if (ctype_digit($lastPointerPart) && $lastPointerPart > count($rootGet)) {
                if ($rootPointer == $lastPointerPart && is_array($targetDocument)) {
                    if ((int) $lastPointerPart <= count($targetDocument) + 1) {
                        array_splice($targetDocument, $lastPointerPart, 0, $replacementValue);
                    }
                }
                return json_encode($targetDocument, JSON_UNESCAPED_UNICODE);
            }
            if (count($pointerParts) === 1) {
                if (is_array($targetDocument)) {
                    $targetDocument[$pointerParts[0]] = $value;
                } else {
                    $targetDocument->{$pointerParts[0]} = $value;
                }
            } elseif (count($pointerParts) > 1) {
                $augmentedDocument = &$targetDocument;
                foreach ($pointerParts as $pointerPart) {
                    if (is_array($augmentedDocument)) {
                        $augmentedDocument = &$augmentedDocument[$pointerPart];
                    } else {
                        $augmentedDocument = &$augmentedDocument->{$pointerPart};
                    }
                }
                $augmentedDocument = $value;
            }
        } else {
            $additionIndex = array_pop($pointerParts);
            $arrayEntryPath = '/' . implode('/', $pointerParts);

            try {
                $targetArray = $pointer->get($arrayEntryPath);
            } catch (NonexistentValueReferencedException $e) {
                $targetArray = null;
            }

            if (is_array($targetArray)) {
                if ($lastPointerPart === Pointer::LAST_ARRAY_ELEMENT_CHAR) {
                    $targetArray[] = $value;
                } else {
                    if (is_numeric($additionIndex)) {
                        array_splice($targetArray, $additionIndex, 0, $replacementValue);
                    } else {
                        $targetArray[$additionIndex] = $value;
                    }
                }
            }

            if (is_object($targetArray)) {
                $targetArray->{$additionIndex} = $value;
            }

            if (is_array($targetArray) || is_object($targetArray)) {
                $augmentedDocument = &$targetDocument;
                foreach ($pointerParts as $pointerPart) {
                    if (is_array($augmentedDocument)) {
                        $augmentedDocument = &$augmentedDocument[$pointerPart];
                    } else {
                        $augmentedDocument = &$augmentedDocument->{$pointerPart};
                    }
                }
                $augmentedDocument = $targetArray;
            }

            if ($targetArray === null) {
                if (is_numeric($additionIndex) && count($targetDocument) > 0) {
                    array_splice($targetDocument, $additionIndex, 0, $replacementValue);
                } else {
                    $targetDocument->{$additionIndex} = $value;
                }
            }
        }

        return json_encode($targetDocument, JSON_UNESCAPED_UNICODE);
    }
1218389
function _findFocusTd($newTable, rowIndex, colIndex) {
  const tableData = dataHandler.createTableData($newTable);
  const newRowIndex = dataHandler.findRowMergedLastIndex(tableData, rowIndex, colIndex) + 1;
  const cellElementIndex = dataHandler.findElementIndex(tableData, newRowIndex, colIndex);

  return $newTable.find('tr').eq(cellElementIndex.rowIndex).find('td')[cellElementIndex.colIndex];
}
1180236
@Override
    public boolean setFocus(final AgendaGroup agendaGroup) {
        // Set the focus to the agendaGroup if it doesn't already have the focus
        if ( this.focusStack.getLast() != agendaGroup ) {
            ((InternalAgendaGroup) this.focusStack.getLast()).setActive( false );
            this.focusStack.add( agendaGroup );
            InternalAgendaGroup igroup = (InternalAgendaGroup) agendaGroup;
            igroup.setActive( true );
            igroup.setActivatedForRecency( this.workingMemory.getFactHandleFactory().getRecency() );
            final EventSupport eventsupport = this.workingMemory;
            eventsupport.getAgendaEventSupport().fireAgendaGroupPushed( agendaGroup,
                                                                        this.workingMemory );
            return true;
        } else {
            return false;
        }
    }
890468
public function setCellPaddings($paddingLeft, $paddingTop, $paddingRight, $paddingBottom)
    {
        $this->_paddingLeft     = $paddingLeft;
        $this->_paddingTop      = $paddingTop;
        $this->_paddingRight    = $paddingRight;
        $this->_paddingBottom   = $paddingBottom;
    }
1115268
public function getSane( $shift = 1, $limitOrFilter = null )
    {

        $backtrace = $this->trace;

        while( $shift-- > 0  ) {
            array_shift( $backtrace );
        }

        if( is_numeric( $limitOrFilter ) ){
            $backtrace = array_slice( $backtrace, 0, (int) $limitOrFilter );
            $limitOrFilter = null;
        }

        $formattedTrace = array_map(
            array( $this, 'traceComponentMakeSane' ),
            $backtrace
        );

        // Apply the filter. Trace fragment is returned if the string limitOrFilter is found anywhere in a trace
        if( null !== $limitOrFilter ) {
            foreach( $formattedTrace as $key => $trace ) {
                $traceMatchesFilter = false;
                while( !$traceMatchesFilter and list(,$traceLine) = each($trace) ) {
                    if( is_string( $traceLine ) ) {
                        $traceMatchesFilter = false !== stripos( $traceLine, $limitOrFilter );
                    }
                }
                if( !$traceMatchesFilter ) {
                    unset( $formattedTrace[$key] );
                }
            }
        }

        return $formattedTrace;

    }
1307870
function( element, index ) {
			if ( typeof index == 'undefined' ) {
				index = this._.focusList.length;
				this._.focusList.push( new Focusable( this, element, index ) );
			} else {
				this._.focusList.splice( index, 0, new Focusable( this, element, index ) );
				for ( var i = index + 1; i < this._.focusList.length; i++ )
					this._.focusList[ i ].focusIndex++;
			}
		}
573635
def focus_next(self):
        """"""
        mid = self.get_selected_mid()
        newpos = self._tree.next_position(mid)
        if newpos is not None:
            newpos = self._sanitize_position((newpos,))
            self.body.set_focus(newpos)