@Override protected void focusView() { scrollPanel.getElement().focus(); } }
@Override public void onTouchStart(TouchStartEvent event) { touchStarted = true; fastClickAt = null; getElement().focus(); }
@Override protected void focusView() { frame.getElement().focus(); } }
/** * Override this method to set focus to necessary element inside the view. Method is called when * focusing the part view. */ protected void focusView() { getElement().focus(); }
@Override public void onClick(ClickEvent event) { if (enabled) { if (fastClickAt != null && (new Date().getTime() - fastClickAt.getTime()) < IGNORE_SIMULATED_CLICKS_THRESHOLD) { // VConsole.log("Ignored simulated event fired by old ios or android " // + (new Date().getTime() - fastClickAt.getTime())); fastClickAt = null; return; } getElement().focus(); } }
public void focus() { fPanel.getElement().focus(); }
@Override public void setFocus(final boolean focused) { if (focused) { uiObject.getElement().focus(); } else { uiObject.getElement().blur(); } } }
@Override public void setFocus(final boolean focused) { if (focused) { uiObject.getElement().focus(); } else { uiObject.getElement().blur(); } } }
@Override public void onKeyPress(KeyPressEvent event) { int code = event.getNativeEvent().getKeyCode(); if (code == KeyCodes.KEY_ESCAPE) { blurHelper.getElement().focus(); } } };
@Override public void setFocus(final boolean focused) { if (focused) { uiObject.getElement().focus(); } else { uiObject.getElement().blur(); } } }
@Override public void setFocus(final boolean focused) { if (focused) { uiObject.getElement().focus(); } else { uiObject.getElement().blur(); } } }
private void prepareForAnimation() { // ensure focus is removed from possibly focused fields getElement().focus(); if (needsIos6ScrollingWorkaround && !preparedForTranslation3d) { prepareForAnimation(prevView); prepareForAnimation(nextView); preparedForTranslation3d = true; } }
/** * Make sure the HTML element has focus and update to render cursor */ protected void onFocusTimer() { BlurHandler oldBlur = this.onTextfieldBlur; onTextfieldBlur = null; mathFieldInternal.update(); // first focus canvas to get the scrolling right html.getElement().focus(); if (focusHandler != null) { focusHandler.onFocus(null); } // after set focus to the keyboard listening element focusTextArea(); onTextfieldBlur = oldBlur; }
@UiHandler("revisionsPanel") public void onPanelScrolled(ScrollEvent ignored) { // We cannot rely on exact equality of scroll positions because GWT sometimes round such values // and it is possible that the actual max scroll position is a pixel less then declared. if (revisionsPanel.getMaximumVerticalScrollPosition() - revisionsPanel.getVerticalScrollPosition() <= 1) { // to avoid autoscrolling to selected item revisionsPanel.getElement().focus(); delegate.onScrolledToButton(); } } }
@UiHandler("revisionsPanel") public void onPanelScrolled(ScrollEvent ignored) { // We cannot rely on exact equality of scroll positions because GWT sometimes round such values // and it is possible that the actual max scroll position is a pixel less then declared. if (revisionsPanel.getMaximumVerticalScrollPosition() - revisionsPanel.getVerticalScrollPosition() <= 1) { // to avoid autoscrolling to selected item revisionsPanel.getElement().focus(); delegate.onScrolledToBottom(); } } }
@UiHandler("revisionsPanel") public void onPanelScrolled(ScrollEvent ignored) { // We cannot rely on exact equality of scroll positions because GWT sometimes round such values // and it is possible that the actual max scroll position is a pixel less then declared. if (revisionsPanel.getMaximumVerticalScrollPosition() - revisionsPanel.getVerticalScrollPosition() <= 1) { // to avoid autoscrolling to selected item revisionsPanel.getElement().focus(); delegate.onScrolledToBottom(); } } }
@Override public void onClick(ClickEvent clickEvent) { widgetsPanel.getElement().focus(); delegate.onWidgetFocused(widgetsPanel.getVisibleWidget()); Scheduler.get() .scheduleDeferred( new Scheduler.ScheduledCommand() { @Override public void execute() { delegate.onAddTabButtonClicked( getAbsoluteLeft(plusPanel.getElement()) + POPUP_OFFSET, getAbsoluteTop(plusPanel.getElement()) + POPUP_OFFSET); } }); } },
private void focusTextArea() { wrap.getElement().focus(); if (html.getElement().getParentElement() != null) { html.getElement().getParentElement().setScrollTop(0); } }
/** * Actually repaint the content (repaint() is ignored in Web * implementation). */ public void repaintWeb() { if (lastIcon == null) { return; } if (!active(wrap.getElement()) && this.enabled) { wrap.getElement().focus(); } final double height = computeHeight(lastIcon); final double width = roundUp(lastIcon.getIconWidth() + 30); ctx.getCanvas().setHeight(((int) Math.ceil(height * ratio))); ctx.getCanvas().setWidth((int) Math.ceil(width * ratio)); ctx.setFillStyle("rgb(255,255,255)"); ctx.fillRect(0, 0, ctx.getCanvas().getWidth(), height); JlmLib.draw(lastIcon, ctx, 0, getMargin(lastIcon), new ColorW(0, 0, 0), "#FFFFFF", null, ratio); }
@Override public void onMouseDown(final MouseDownEvent event) { event.preventDefault(); // Check if the zoom selection is active, if so, it's possible that the // mouse left the browser mid-selection and got stuck enabled even // though the mouse isn't still pressed. If that's the case, do a similar // operation to the onMouseUp event. if (zoom_selection_active) { endSelection(event); return; } final Element image = graph.getElement(); zoom_selection_active = true; start_x = event.getRelativeX(image); start_y = event.getRelativeY(image); end_x = 0; end_y = 0; graphbox.setWidgetPosition(this, start_x, start_y); super.setWidth("0px"); super.setHeight("0px"); super.setVisible(true); // Workaround to steal the focus from whatever had it previously, // which may cause the graph to reload as a side effect. super.getElement().focus(); graph_move_handler = graph.addMouseMoveHandler(this); box_move_handler = super.addMouseMoveHandler(this); }