@Override protected void setFocusImpl(boolean focused) { if (isFirstFocus) { isFirstFocus = false; setFirstFocusImpl(); } else { super.setFocusImpl(focused); } } }
@Override public void setBackColor(String color) { // Webkit uses 'BackColor' for the *entire area's* background. 'HiliteColor' // does what we actually want. execCommand("HiliteColor", color); }
@Override public void setTabIndex(int index) { FocusPanel.impl.setTabIndex(focusable, index); }
@Override public int getTabIndex() { return FocusPanel.impl.getTabIndex(focusable); }
@Override public void setAccessKey(char key) { FocusPanel.impl.setAccessKey(focusable, key); }
String queryCommandValue(String cmd) { if (isReady) { // When executing a command, focus the iframe first, since some commands // don't take properly when it's not focused. setFocus(true); try { return queryCommandValueAssumingFocus(cmd); } catch (JavaScriptException e) { return ""; } } return ""; }
boolean queryCommandState(String cmd) { if (isReady) { // When executing a command, focus the iframe first, since some commands // don't take properly when it's not focused. setFocus(true); try { return queryCommandStateAssumingFocus(cmd); } catch (JavaScriptException e) { return false; } } return false; }
@Override public Element createFocusable() { return createFocusable0(ensureFocusHandler()); }
@Override public void setFocus(boolean focused) { if (initializing) { // Issue 3503: if we focus before the iframe is in design mode, the text // caret will not appear. isPendingFocus = focused; } else { setFocusImpl(focused); } }
public void setJustification(Justification justification) { if (justification == Justification.CENTER) { execCommand("JustifyCenter", null); } else if (justification == Justification.FULL) { execCommand("JustifyFull", null); } else if (justification == Justification.LEFT) { execCommand("JustifyLeft", null); } else if (justification == Justification.RIGHT) { execCommand("JustifyRight", null); } }
@Override public void setBackColor(String color) { // Gecko uses 'BackColor' for the *entire area's* background. 'HiliteColor' // does what we actually want. execCommand("HiliteColor", color); }
@Override public String getBackColor() { return queryCommandValue("HiliteColor"); }
@Override public void applyTo(ImagePrototypeElement imageElement) { impl.adjust(imageElement, url, left, top, width, height); }
@Override public ImagePrototypeElement createElement() { return (ImagePrototypeElement) impl.createStructure(url, left, top, width, height); }
@Override public SafeHtml getSafeHtml() { return impl.getSafeHtml(url, left, top, width, height, isDraggable); }
@Override public void setEnabled(boolean enabled) { impl.setEnabled(enabled); }
private JavaScriptObject ensureFocusHandler() { return focusHandler != null ? focusHandler : (focusHandler = createFocusHandler()); } }
@Override public boolean isEnabled() { return impl.isEnabled(); }
@Override public Element getStyleElement(Element outerElem) { return isFF2Mac ? outerElem : super.getStyleElement(outerElem); }