Indicate whether this component should be focused or not

@param focus
if the component should be focused
504375
public void setFocus(boolean focus) {
		if (focus) {
			if (currentFocus != null) {
				currentFocus.setFocus(false);
			}
			currentFocus = this;
		} else {
			if (currentFocus == this) {
				currentFocus = null;
			}
		}
		this.focus = focus;
	}
298418
function(e) {
            this.hasFocus = true;
            this.setSelectionIfNeeded(e.target);

            if (this.props.onFocus) {
                return this.props.onFocus(e);
            }
        }
514604
public void setActualImageFocusPoint(PointF focusPoint) {
    Preconditions.checkNotNull(focusPoint);
    getScaleTypeDrawableAtIndex(ACTUAL_IMAGE_INDEX).setFocusPoint(focusPoint);
  }
1091704
function (value) {
            if (!this._isValidIndex(value) || this._focusIndex == value) {
                return;
            }
            this._focusIndex = value;
            this.indexFocused.emit(value);
            this._setTabFocus(value);
        }
257266
private static WindowFocusListener createRepaintWindowListener(final JComponent component) {
        return new WindowAdapter() {
            public void windowActivated(WindowEvent e) {
                component.repaint();
            }

            public void windowDeactivated(WindowEvent e) {
                component.repaint();
            }
        };
    }
234645
function(e) {
			var self = this;
			var wasFocused = self.isFocused;
	
			if (self.isDisabled) {
				self.blur();
				e && e.preventDefault();
				return false;
			}
	
			if (self.ignoreFocus) return;
			self.isFocused = true;
			if (self.settings.preload === 'focus') self.onSearchChange('');
	
			if (!wasFocused) self.trigger('focus');
	
			if (!self.$activeItems.length) {
				self.showInput();
				self.setActiveItem(null);
				self.refreshOptions(!!self.settings.openOnFocus);
			}
	
			self.refreshState();
		}
64052
def focusInEvent(self, event):
        """"""
        show_status = getattr(self.lineEdit(), 'show_status_icon', None)
        if show_status:
            show_status()
        QComboBox.focusInEvent(self, event)
1032593
function () {
        if (this._focusedItem) {
            Event.removeListener(this._focusedItem,'blur');
            this._focusedItem = null;
        }
        var el;
        while ((el = this._focusHighlightedItems.shift())) {  // yes, it is meant as an assignment, really
            Dom.removeClass(el,YAHOO.widget.TreeView.FOCUS_CLASS_NAME );
        }
    }
366572
function doFocusExit(el, fromElement, toElement) {
    el.dispatchEvent(new CustomEvent('focusExit', {
        detail: { fromElement: fromElement, toElement: toElement },
        bubbles: false // mirror the native mouseleave event
    }));
}
418259
public function focus()
    {
        if (\in_array($this->attribs['type'], array('checkbox', 'radio'))) {
            $keys = \array_keys($this->props['options']);
            $this->props['options'][ $keys[0] ]['autofocus'] = true;
        } else {
            $this->attribs['autofocus'] = true;
        }
    }
350708
function onFocus(cm) {
    if (cm.options.readOnly == "nocursor") return;
    if (!cm.state.focused) {
      signal(cm, "focus", cm);
      cm.state.focused = true;
      addClass(cm.display.wrapper, "CodeMirror-focused");
      // The prevInput test prevents this from firing when a context
      // menu is closed (since the resetInput would kill the
      // select-all detection hack)
      if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {
        resetInput(cm);
        if (webkit) setTimeout(bind(resetInput, cm, true), 0); // Issue #1730
      }
    }
    slowPoll(cm);
    restartBlink(cm);
  }
4360
function (domEvt) {
            var domElt = this.getDom();
            if (this.sendKey(domEvt.charCode, domEvt.keyCode)) {
                domEvt.preventDefault(true);
                domElt.focus();
            }
        }
730574
def setFocus(self, reason=None):
        """"""
        self.formLayout.itemAt(0, QFormLayout.FieldRole).widget().setFocus()
79253
function (event) {
            this._hasFocus = true;
            this._setState();
            this._updateDomForState();
            var focusCallback = this._cfg.onfocus;
            if (focusCallback) {
                this.evalCallback(focusCallback);
            }
       }
224499
function setFocusedElement(cstOption) {
    if (focusedElement) {
      focusedElement.classList.remove(builderParams.hasFocusClass);
    }
    if (typeof cstOption !== 'undefined') {
      focusedElement = cstOption;
      focusedElement.classList.add(builderParams.hasFocusClass);
      // Offset update: checks if the focused element is in the visible part of the panelClass
      // if not dispatches a custom event
      if (isOpen) {
        if (cstOption.offsetTop < cstOption.offsetParent.scrollTop
          || cstOption.offsetTop >
            (cstOption.offsetParent.scrollTop + cstOption.offsetParent.clientHeight)
            - cstOption.clientHeight) {
          cstOption.dispatchEvent(new CustomEvent('custom-select:focus-outside-panel', { bubbles: true }));
        }
      }
    } else {
      focusedElement = undefined;
    }
  }
303715
function () {
        var self = this, settings = self.settings;

        self._super();

        if (!self.parent() && (settings.width || settings.height)) {
          self.initLayoutRect();
          self.repaint();
        }

        if (settings.autofocus) {
          self.focus();
        }
      }
43635
@Override
	public void focus() {
		if (cp.getDebugMode() == true
				&& (cp.getBrowser().equalsIgnoreCase("ie")
						|| cp.getBrowser().equalsIgnoreCase("*iexplore") || cp
						.getBrowser().equalsIgnoreCase("iexplore")))

			windowFocus();
		else if (doFocusOnClick)
			windowFocus();
	}