Sets the focus on the current focused step again. If the current focused step is not visible anymore the following step in the given direction is focused. Allowed directions are: next, prev, first, last
549090
function(oThis, sDir){
		if (!oThis.sCurrentFocusedStepRefId) {
			return;
		}

		if (sDir && !RoadMapRenderer.isVisibleRef(oThis, oThis.sCurrentFocusedStepRefId)) {
			focusStep(null, oThis, sDir);
		} else {
			document.getElementById(oThis.sCurrentFocusedStepRefId + "-box").focus();
		}
	}
1106747
function ( direction ) {
			var current = F.current;

			if (current) {
				if (!isString(direction)) {
					direction = current.direction.prev;
				}

				F.jumpto(current.index - 1, direction, 'prev');
			}
		}
1189107
def focusIn(self, event=None):
        """"""
        try:
            # doScroll returns false if the call was ignored because the
            # last call also came from this widget.  That avoids unwanted
            # scrolls and text selection when the focus moves in and out
            # of the window.
            if self.doScroll(event):
                self.entry.selection_range(0, END) # select all text in widget
            else:
                # restore selection to what it was on the last FocusOut
                if self.lastSelection:
                    self.entry.selection_range(*self.lastSelection)
        except AttributeError:
            pass
1080927
function (direction) {
                if (!this._cfg || !this._cfg.bind || !this._cfg.bind.value) {
                    // no binding for the value : return
                    return;
                }
                var currentBinding = this._cfg.bind.value;
                var index = ariaUtilsArray.indexOf(this._instances, this), radioButtonNb = this._instances.length;
                var bindings, next, nextBinding;
                var waiAria = this._cfg.waiAria;
                while (index >= 0 && index < radioButtonNb) {
                    index = index + direction;
                    if (waiAria) {
                        if (index < 0) {
                            index = radioButtonNb - 1;
                        } else if (index >= radioButtonNb) {
                            index = 0;
                        }

                    } else if (index < 0 || index >= radioButtonNb) {
                        break;
                    }
                    next = this._instances[index];
                    bindings = next._cfg.bind;
                    if (!next.getProperty("disabled") && bindings) {
                        nextBinding = bindings.value;
                        if (nextBinding) {
                            // next radio button needs to be bound to the same data. Otherwise, continue.
                            if (currentBinding.inside === nextBinding.inside && currentBinding.to === nextBinding.to) {
                                next._setRadioValue();
                                next._focus();
                                break;
                            }
                        }
                    }
                }
            }
813045
def update(self):
        
        old_focus_position = self.todolist.focus
        id_length = max_id_length(self.view.todolist.count())

        del self.todolist[:]

        for group, todos in self.view.groups.items():
            if len(self.view.groups) > 1:
                grouplabel = ", ".join(group)
                self.todolist.append(urwid.Text(grouplabel))
                self.todolist.append(urwid.Divider('-'))

            for todo in todos:
                todowidget = TodoWidget.create(todo, id_length)
                todowidget.number = self.view.todolist.number(todo)
                self.todolist.append(todowidget)
                self.todolist.append(urwid.Divider('-'))

        if old_focus_position:
            try:
                self.todolist.set_focus(old_focus_position)
            except IndexError:
                # scroll to the bottom if the last item disappeared from column
                # -2 for the same reason as in self._scroll_to_bottom()
                self.todolist.set_focus(len(self.todolist) - 2)
441024
def focus_property(self, prop, direction):
        """"""
        newpos = self.get_selected_mid()
        newpos = direction(newpos)
        while newpos is not None:
            MT = self._tree[newpos]
            if prop(MT):
                newpos = self._sanitize_position((newpos,))
                self.body.set_focus(newpos)
                break
            newpos = direction(newpos)
118948
public void myFocusGained()
    {
        m_bInFocus = true;
        String strText = super.getText();
        if (m_strDescription.equals(strText))
        {   // Don't notify of change
            if (m_actionListener != null)
                this.removeActionListener(m_actionListener);
            this.changeFont(false);
            super.setText(Constants.BLANK);
            if (m_actionListener != null)
                this.addActionListener(m_actionListener);
        }
    }
773897
private void setRawDirection(SwipyRefreshLayoutDirection direction) {
        if (mDirection == direction) {
            return;
        }

        mDirection = direction;
        switch (mDirection) {
            case BOTTOM:
                mCurrentTargetOffsetTop = mOriginalOffsetTop = getMeasuredHeight();
                break;
            case TOP:
            default:
                mCurrentTargetOffsetTop = mOriginalOffsetTop = -mCircleView.getMeasuredHeight();
                break;
        }
    }
701910
def focus_next(self, count=1):
        "  "
        panes = self.panes
        if panes:
            self.active_pane = panes[(panes.index(self.active_pane) + count) % len(panes)]
        else:
            self.active_pane = None
135686
public void goToStep(MaterialStep step) {
        for (int i = 0; i < getWidgetCount(); i++) {
            Widget w = getWidget(i);
            if (w instanceof MaterialStep) {
                MaterialStep materialStep = (MaterialStep) w;
                boolean active = materialStep.equals(step);
                materialStep.setActive(active);
                if (active) {
                    setCurrentStepIndex(i);
                }
            }
        }
    }
1263433
function(direction, e) {
			var self = this, fn, $adj;
	
			if (direction === 0) return;
	
			fn = direction > 0 ? 'next' : 'prev';
			if (self.isShiftDown) {
				$adj = self.$control_input[fn]();
				if ($adj.length) {
					self.hideInput();
					self.setActiveItem($adj);
					e && e.preventDefault();
				}
			} else {
				self.setCaret(self.caretPos + direction);
			}
		}
1094089
def focus_next_sibling(self):
        """"""
        w, focuspos = self.get_focus()
        sib = self._tree.next_sibling_position(focuspos)
        if sib is not None:
            self.set_focus(sib)
187564
def focus_next_unfolded(self):
        """"""
        self.focus_property(lambda x: not x.is_collapsed(x.root),
                            self._tree.next_position)
556582
def set_focus(self, point):
        
        if isinstance(point, np.ndarray):
            if point.ndim != 1:
                point = point.ravel()
        self.camera.SetFocalPoint(point)
        self._render()
20628
@Override
    protected void onFocusChanged(boolean focused, int direction,
                                  Rect previouslyFocusedRect) {
        super.onFocusChanged(focused, direction, previouslyFocusedRect);
        showErrorIconHax(lastErrorIcon);
    }
1210154
def focusOutEvent( self, event ):
        
        super(XNavigationEdit, self).focusOutEvent(event)
        
        self.cancelEdit()
341022
public void prevStep() {
        if (currentStepIndex > 0) {
            Widget w = getWidget(currentStepIndex);
            if (w instanceof MaterialStep) {
                MaterialStep step = (MaterialStep) w;
                step.setActive(false);

                // prev step
                int prevStepIndex = getWidgetIndex(step) - 1;
                if (prevStepIndex >= 0) {
                    for (int i = prevStepIndex; i >= 0; i--) {
                        w = getWidget(i);
                        if (!(w instanceof MaterialStep)) {
                            continue;
                        }
                        MaterialStep prevStep = (MaterialStep) w;
                        if (prevStep.isEnabled() && prevStep.isVisible()) {
                            prevStep.setActive(true);
                            setCurrentStepIndex(i);
                            PreviousEvent.fire(MaterialStepper.this);
                            break;
                        }
                    }
                }
            }
        } else {
            GWT.log("You have reached the minimum step.");
        }
    }