Sets the <code>focused</code> state of this {@link UIComponent}.

@param focused the state
506415
public void setFocused(boolean focused)
	{
		if (!isEnabled())
			return;

		boolean flag = this.focused != focused;
		flag |= MalisisGui.setFocusedComponent(this, focused);
		if (!flag)
			return;

		this.focused = focused;
		fireEvent(new FocusStateChange<>(this, focused));
	}
653151
function() {
            if (this.first !== null) {
                this.first = this.getItemIndex(this.$first);
                this.setFocusableItem(this.$first);
            }
            else if (this.$items.length) {
                this.setFocusableItem($(this.$items[0]));
            }

            if (this.$focusedItem) {
                this.setFocusableItem(this.$focusedItem);
                this.focusItem(this.$focusedItem);
            }

            if (this.last !== null) {
                this.last = this.getItemIndex(this.$last);
            }
        }
215892
public static void resetFocus (Stage stage, Actor caller) {
		if (focusedWidget != null) focusedWidget.focusLost();
		if (stage != null && stage.getKeyboardFocus() == caller) stage.setKeyboardFocus(null);
		focusedWidget = null;
	}
867424
public void focusGained(FocusEvent e)
    {
        if (m_componentNextFocus != null)
        {
            m_componentNextFocus.requestFocus();
            return;
        }
        Component component = (Component)e.getSource();
        String string = component.getName();
        if (this.getFieldList() != null)
        {
            FieldInfo field = this.getFieldList().getField(string);        // Get the fieldInfo for this component
            if (field != null)
                this.getBaseApplet().setStatusText(field.getFieldTip(), Constants.INFORMATION);
        }
        String strLastError = BaseApplet.getSharedInstance().getLastError(0);
        if ((strLastError != null) && (strLastError.length() > 0))
            this.getBaseApplet().setStatusText(strLastError, Constants.WARNING);
    }
79253
function (event) {
            this._hasFocus = true;
            this._setState();
            this._updateDomForState();
            var focusCallback = this._cfg.onfocus;
            if (focusCallback) {
                this.evalCallback(focusCallback);
            }
       }
1099233
public void setActive(boolean active) {
        if (this.active != active) {
            this.active = active;
            inviteListener.setActive(active);
            acceptListener.setActive(active);
            participants.clear();
            participants.add(self);
            participantListener.setActive(active);
        }
    }
1143409
@Override
    public void setComponentEnabled(boolean enabled) {
        super.setComponentEnabled(enabled);

        boolean enable = enabled && getModel().getRowCount() > 0;
        enableAllButton.setEnabled(enable);
        disableAllButton.setEnabled(enable);
    }
875438
@Override
    public void setComponentEnabled(boolean enabled) {
        super.setComponentEnabled(enabled);

        boolean enable = enabled && getTable().getSelectionModel().getMinSelectionIndex() >= 0;
        if (enable) {
            updateMoveButtons();
        } else {
            disableMoveButtons();
        }
    }
360113
public void setSelectedComponent (ComponentClass cclass, int cid)
    {
        _selected.put(cclass, Integer.valueOf(cid));
        notifyListeners(BuilderModelListener.COMPONENT_CHANGED);
    }
1281000
def SetFocus(self, **kwargs):
        
        if self._focus is not None:
            self._focus.SetFocus()
        else:
            # fall back on the default behaviour
            super(_FocusablePanel, self).SetFocus()
359484
public void focus() {
        String cantFocus = "Unable to focus on ";
        String action = "Focusing on " + prettyOutput();
        String expected = prettyOutputStart() + " is present, displayed, and enabled to be focused";
        try {
            if (isNotPresentDisplayedEnabledInput(action, expected, cantFocus)) {
                return;
            }
            WebElement webElement = getWebElement();
            new Actions(driver).moveToElement(webElement).perform();
        } catch (Exception e) {
            log.warn(e);
            reporter.fail(action, expected, cantFocus + prettyOutputEnd() + e.getMessage());
            return;
        }
        reporter.pass(action, expected, "Focused on " + prettyOutputEnd().trim());
    }
46756
public void focusLost(FocusEvent e)
    {
        m_componentNextFocus = null;
        Component component = (Component)e.getSource();
        String string = component.getName();
        FieldInfo field = null;
        if (this.getFieldList() != null)
            field = this.getFieldList().getField(string);        // Get the fieldInfo for this component
        if (field != null)
        {
            int iErrorCode = Constants.NORMAL_RETURN;
            if (component instanceof FieldComponent)
                iErrorCode = field.setData(((FieldComponent)component).getControlValue(), Constants.DISPLAY, Constants.SCREEN_MOVE);
            else if (component instanceof JTextComponent)
                iErrorCode = field.setString(((JTextComponent)component).getText(), Constants.DISPLAY, Constants.SCREEN_MOVE);
            if (iErrorCode != Constants.NORMAL_RETURN)
            {
                field.displayField();               // Redisplay the old field value
                m_componentNextFocus = component;   // Next focus to this component
            }
        }
    }
966322
@Override
    public void setTarget(String target) {

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
            SibTr.debug(this, TRACE, "setTarget", target);
        }
        _target = target;

    }
66151
public void setEnabled(boolean enabled)
	{
		if (isEnabled() == enabled)
			return;

		if (!fireEvent(new DisabledStateChange<>(this, enabled)))
			return;

		this.enabled = enabled;
		if (enabled)
		{
			setHovered(false);
			setFocused(false);
		}
	}
190593
function focusBinding (event) {
        this._hasFocus = true;
        var cb;
        if (this._hasPlaceholder) {
            cb = this._setCaretForPlaceholder;
        } else if (this._cfg.autoselect) {
            cb = this._autoselect;
        }

        if (cb) {
            ariaCoreTimer.addCallback({
                fn : cb,
                scope : this,
                delay : 4
            });
        }

    }
1359283
protected boolean activateAndFocusComponentWindow(Component c) {
        Component parent = c;
        //active the parent window
        while (!(parent instanceof Window)) {
            parent = parent.getParent();
        }
        final Window window = (Window) parent;

        if (!window.isFocused()) {
            if (!window.isVisible()) {
                LOGGER.trace("cannot activate and focus the window of '" + c.getName() + "' cause its window is not visible");
                return false;
            }
            LOGGER.trace("try to activate and focus the window of '" + c.getName() + "' cause its window is not focused");
            final KeyboardFocusManager keyboardFocusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
            WindowFocusedListener windowFocusedListener = new WindowFocusedListener(window);
            window.addWindowFocusListener(windowFocusedListener);
            SwingUtilities.invokeLater(() -> {
                // try to activate application if not active
                if (keyboardFocusManager.getActiveWindow() == null) {
                    LOGGER.trace("try to activate application");
                    // create and display a new frame to force application activation
                    JFrame newFrame = new JFrame();
                    newFrame.pack();
                    newFrame.setVisible(true);
                    newFrame.toFront();
                    newFrame.setVisible(false);
                    newFrame.dispose();
                }

                window.toFront();

                LOGGER.trace("current focused window : " + keyboardFocusManager.getFocusedWindow());
                window.requestFocus();
            });

            boolean windowFocused = windowFocusedListener.waitUntilWindowFocused();
            window.removeWindowFocusListener(windowFocusedListener);
            LOGGER.trace("window focused ? " + windowFocused);
            LOGGER.trace("focused window after request: " + keyboardFocusManager.getFocusedWindow());
            if (!windowFocused) {
                LOGGER.warn("The window activation/focus process failed!!!");
                return false;
            }
            LOGGER.trace("The window activation/focus process is completed!!!");
        } else {
            LOGGER.trace("the window of '" + c.getName() + "' is already focused");
        }
        return true;
    }
223210
public void setComponent(String v) {
    if (ProcessingStep_Type.featOkTst && ((ProcessingStep_Type)jcasType).casFeat_component == null)
      jcasType.jcas.throwFeatMissing("component", "edu.cmu.lti.oaqa.framework.types.ProcessingStep");
    jcasType.ll_cas.ll_setStringValue(addr, ((ProcessingStep_Type)jcasType).casFeatCode_component, v);}