Handles text box focus.<p>

@param event the focus event
963179
@UiHandler("m_textbox")
    void onTextboxFocus(FocusEvent event) {

        m_mainPanel.remove(m_fadePanel);
        setTitle("");
        CmsDomUtil.fireFocusEvent(this);
    }
414923
@Override
  public synchronized void handleEvent(final Event event) {
    if (event.getType() == EventType.JOB_FINISHED && Status.FAILED
        .equals(event.getData().getStatus())) {
      this.value = this.value + 1;
    }
  }
1169669
function (event) {
            this._toggleValue();
            if (!this._hasFocus) {
                this._focus();
            }
            if (event.target.tagName.toLowerCase() != "input") {
                event.preventDefault(true);
            }
        }
694529
public void onUp(HumanInputEvent<?> event) {
		if (!isRightMouseButton(event)) {
			ToggleSelectionAction action = new ToggleSelectionAction(mapWidget, pixelTolerance);
			action.setPriorityToSelectedLayer(priorityToSelectedLayer);
			action.toggleSingle(getLocation(event, RenderSpace.SCREEN));
		}
	}
788502
void handleFileTreeClick(ItemClickEvent event) {

        Item resourceItem = m_treeContainer.getItem(event.getItemId());
        if ((resourceItem.getItemProperty(CmsResourceTableProperty.PROPERTY_DISABLED).getValue() == null)
            || !((Boolean)resourceItem.getItemProperty(
                CmsResourceTableProperty.PROPERTY_DISABLED).getValue()).booleanValue()) {
            // don't handle disabled item clicks
            try {
                readFolder((CmsUUID)event.getItemId());
            } catch (CmsException e) {
                CmsErrorDialog.showErrorDialog(
                    CmsVaadinUtils.getMessageText(Messages.ERR_EXPLORER_CAN_NOT_READ_RESOURCE_1, event.getItemId()),
                    e);
                LOG.error(e.getLocalizedMessage(), e);
            }
        }
    }
1011654
function (event) {
            var browser = ariaCoreBrowser;
            if (browser.isAndroid && browser.isChrome && !event.isSpecialKey && event.keyCode == 229) {
                event.charCode = 0;
                this._handleKey(event);
            }
            this.$TextInput._dom_onkeyup.call(this, event);
        }
756064
function searchBar_focus(event)
  {
    var input = this.getElement({type: "searchBar_input"});

    switch (event.type) {
      case "click":
        this._controller.click(input);
        break;
      case "shortcut":
        if (mozmill.isLinux) {
          var cmdKey = utils.getEntity(this.getDtds(), "searchFocusUnix.commandkey");
        } else {
          var cmdKey = utils.getEntity(this.getDtds(), "searchFocus.commandkey");
        }
        this._controller.keypress(null, cmdKey, {accelKey: true});
        break;
      default:
        throw new Error(arguments.callee.name + ": Unknown element type - " + event.type);
    }

    // Check if the search bar has the focus
    var activeElement = this._controller.window.document.activeElement;
    this._controller.assertJS("subject.isFocused == true",
                              {isFocused: input.getNode() == activeElement});
  }
239549
function( event ) {

                    var target = event.target

                    // Make sure the target isn’t the root holder so it can bubble up.
                    if ( target != P.$root.children()[ 0 ] ) {

                        event.stopPropagation()

                        // * For mousedown events, cancel the default action in order to
                        //   prevent cases where focus is shifted onto external elements
                        //   when using things like jQuery mobile or MagnificPopup (ref: #249 & #120).
                        //   Also, for Firefox, don’t prevent action on the `option` element.
                        if ( event.type == 'mousedown' && !$( target ).is( 'input, select, textarea, button, option' )) {

                            event.preventDefault()

                            // Re-focus onto the root so that users can click away
                            // from elements focused within the picker.
                            P.$root[0].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();
	}
498024
function (event) {
            var domUtil = ariaUtilsDom;

            var inputField = this.getTextInputField();
            var inputFieldValue = inputField.value;
            var inputFieldIsEmpty = (ariaUtilsString.trim(inputFieldValue) === "");

            switch (event.keyCode) {

                case event.KC_ARROW_LEFT :
                    if (this.hasInsertedOptions()) {

                        if (this.isInputFieldFocused()) {
                            var position = ariaUtilsCaret.getPosition(inputField);
                            if (position.start === 0 && position.end === 0) {
                                event.preventDefault();

                                // Close the dropdown in order not to mess with focus events and so on
                                this._closeDropdown();

                                // Highlight last option
                                this.highlightOption(this.insertedOptionsCount());
                                break;
                            }
                        }

                        if (this.isInHighlightedMode()) {
                            event.preventDefault();

                            this.__navigateLeftInHighlightedMode();
                            break;
                        }
                    }

                    break;

                case event.KC_ARROW_RIGHT :
                    if (this.isInHighlightedMode()) {
                        event.preventDefault();

                        this.__navigateRightInHighlightedMode();
                    }

                    break;

                case event.KC_TAB :
                    if (this.isInputFieldFocused()) {
                        if (inputFieldIsEmpty) {
                            if (inputField.nextSibling != null) {
                                event.preventDefault();

                                this._makeInputFieldLastChild();
                                this.setHelpText(false);
                                inputField.focus();
                            }
                        }
                    }

                    break;

                case event.KC_BACKSPACE :
                    if (inputFieldIsEmpty) {
                        var highlightedElementIndex = this.getHighlightedOptionIndex();
                        var highlightedElement = this.getHighlightedOption();

                        if (highlightedElement) {
                            var highlightedElementLabel = highlightedElement.textContent
                                    || highlightedElement.innerText;
                            domUtil.removeElement(highlightedElement);

                            var newIndex = highlightedElementIndex - 1;
                            if (newIndex >= 1) {
                                this.highlightOption(newIndex);
                            } else {
                                if (this.insertedOptionsCount() > 0) {
                                    this.highlightOption(1);
                                } else {
                                    this._enterInputField();
                                }
                            }

                            this._removeValue(highlightedElementLabel);
                        } else {
                            var previousSiblingElement = domUtil.getPreviousSiblingElement(inputField);
                            if (previousSiblingElement) {
                                var previousSiblingLabel = previousSiblingElement.firstChild.textContent
                                        || previousSiblingElement.firstChild.innerText;
                                domUtil.removeElement(previousSiblingElement);
                                this._removeValue(previousSiblingLabel);
                            }
                        }
                        event.preventDefault();
                    }

                    break;

                case event.KC_DELETE :
                    if (inputFieldIsEmpty) {
                        var highlightedElementIndex = this.getHighlightedOptionIndex();
                        var highlightedElement = this.getHighlightedOption();

                        if (highlightedElement) {
                            var highlightedElementLabel = highlightedElement.textContent
                                    || highlightedElement.innerText;
                            domUtil.removeElement(highlightedElement);

                            if (highlightedElementIndex <= this.insertedOptionsCount()) {
                                this.highlightOption(highlightedElementIndex);
                            } else {
                                this._enterInputField();
                            }

                            this._removeValue(highlightedElementLabel);
                        }
                    }

                    break;
            }

            if (this.isInputFieldFocused()) {
                this.$AutoComplete._dom_onkeydown.call(this, event);
            }
        }
64052
def focusInEvent(self, event):
        """"""
        show_status = getattr(self.lineEdit(), 'show_status_icon', None)
        if show_status:
            show_status()
        QComboBox.focusInEvent(self, event)
1016924
public void cmsEvent(CmsEvent event) {

        switch (event.getType()) {
            case I_CmsEventListener.EVENT_CLEAR_CACHES:
                flushMessageCache();
                m_editorDisplayOptions.clearCache();
                if (LOG.isDebugEnabled()) {
                    LOG.debug(Messages.get().getBundle().key(Messages.LOG_EVENT_CLEAR_CACHES_0));
                }
                break;
            default: // no operation
        }
    }
208505
public void handleEvent(Event event) {
        LOG.fine("ContentLengthHandler called");

        //if maximum length is shorter then <cut><![CDATA[ ]]></cut> it's not possible to cut the content
        if(CUT_START_TAG.length() + CUT_END_TAG.length() > length) {
            LOG.warning("Trying to cut content. But length is shorter then needed for "
                + CUT_START_TAG + CUT_END_TAG + ". So content is skipped.");
            event.setContent("");
            return;
        }

        int currentLength = length - CUT_START_TAG.length() - CUT_END_TAG.length();

        if (event.getContent() != null && event.getContent().length() > length) {
            LOG.fine("cutting content to " + currentLength
                    + " characters. Original length was "
                    + event.getContent().length());
            LOG.fine("Content before cutting: " + event.getContent());
            event.setContent(CUT_START_TAG
                    + event.getContent().substring(0, currentLength) + CUT_END_TAG);
            LOG.fine("Content after cutting: " + event.getContent());
        }
    }
472582
void handleSelection(CmsResource resource) {

        for (I_CmsSelectionHandler<CmsResource> handler : m_resourceSelectionHandlers) {
            handler.onSelection(resource);
        }
    }
1326812
protected void onUp(Event event) {

        m_clientX = event.getClientX();
        m_clientY = event.getClientY();
        m_modifierCTRL = event.getCtrlKey() || event.getMetaKey();
        if ((m_currentTarget == null) || (m_currentTarget.getPlaceholderIndex() < 0)) {
            cancel();
        } else {
            drop();
        }
    }
1266114
@Override
	public void onBrowserEvent(Event event) {
		super.onBrowserEvent(event);
		if (enabled) {
			switch (DOM.eventGetType(event)) {
			// Unhighlight and cancel keyboard events
				case Event.ONBLUR:
					keyTimer.cancel();
					if (slidingMouse) {
						DOM.releaseCapture(getElement());
						slidingMouse = false;
						slideKnob(event);
						stopSliding(true, true);
					} else if (slidingKeyboard) {
						slidingKeyboard = false;
						stopSliding(true, true);
					}
					unhighlight();
					break;

				// Highlight on focus
				case Event.ONFOCUS:
					highlight();
					break;

				// Mousewheel events
				case Event.ONMOUSEWHEEL:
					int velocityY = DOM.eventGetMouseWheelVelocityY(event);
					DOM.eventPreventDefault(event);
					if (velocityY > 0) {
						shiftRight(1);
					} else {
						shiftLeft(1);
					}
					break;

				// Shift left or right on key press
				case Event.ONKEYDOWN:
					if (!slidingKeyboard) {
						int multiplier = 1;
						if (DOM.eventGetCtrlKey(event)) {
							multiplier = (int) (getTotalRange() / stepSize / 10);
						}

						switch (DOM.eventGetKeyCode(event)) {
							case KeyCodes.KEY_HOME:
								DOM.eventPreventDefault(event);
								setCurrentValue(minValue);
								break;
							case KeyCodes.KEY_END:
								DOM.eventPreventDefault(event);
								setCurrentValue(maxValue);
								break;
							case KeyCodes.KEY_LEFT:
								DOM.eventPreventDefault(event);
								slidingKeyboard = true;
								startSliding(false, true);
								shiftLeft(multiplier);
								keyTimer.schedule(400, false, multiplier);
								break;
							case KeyCodes.KEY_RIGHT:
								DOM.eventPreventDefault(event);
								slidingKeyboard = true;
								startSliding(false, true);
								shiftRight(multiplier);
								keyTimer.schedule(400, true, multiplier);
								break;
							case 32:
								DOM.eventPreventDefault(event);
								setCurrentValue(minValue + getTotalRange() / 2);
								break;
						}
					}
					break;
				// Stop shifting on key up
				case Event.ONKEYUP:
					keyTimer.cancel();
					if (slidingKeyboard) {
						slidingKeyboard = false;
						stopSliding(true, true);
					}
					break;

				// Mouse Events
				case Event.ONMOUSEDOWN:
					setFocus(true);
					slidingMouse = true;
					DOM.setCapture(getElement());
					startSliding(true, true);
					DOM.eventPreventDefault(event);
					slideKnob(event);
					break;
				case Event.ONMOUSEUP:
					if (slidingMouse) {
						DOM.releaseCapture(getElement());
						slidingMouse = false;
						slideKnob(event);
						stopSliding(true, true);
					}
					break;
				case Event.ONMOUSEMOVE:
					if (slidingMouse) {
						slideKnob(event);
					}
					break;
			}
		}
	}
54137
@Override
  public synchronized void handleEvent(final Event event) {
    if (event.getType() == EventType.JOB_STARTED) {
      this.value = this.value + 1;
    } else if (event.getType() == EventType.JOB_FINISHED) {
      this.value = this.value - 1;
    }
  }