/** * Make an element focusable or not. * * @param elem the element * @param focusable true to make focusable, false to make unfocusable */ protected void setFocusable(Element elem, boolean focusable) { if (focusable) { FocusImpl focusImpl = FocusImpl.getFocusImplForWidget(); focusImpl.setTabIndex(elem, getTabIndex()); if (accessKey != 0) { focusImpl.setAccessKey(elem, accessKey); } } else { // Chrome: Elements remain focusable after removing the tabIndex, so set // it to -1 first. elem.setTabIndex(-1); elem.removeAttribute("tabIndex"); elem.removeAttribute("accessKey"); } }
cellParent.removeAttribute("accessKey"); } else { FocusImpl focusImpl = FocusImpl.getFocusImplForWidget(); focusImpl.setTabIndex(cellParent, tree.getTabIndex()); char accessKey = tree.getAccessKey();
public void focusField() { if (field != null) { FocusImpl.getFocusImplForWidget().focus(field.getElement()); } }
private void doFocus() { FocusImpl.getFocusImplForWidget().focus(getFocusEl()); }
FocusImpl.getFocusImplForWidget();
/** * Make an element focusable or not. * * @param elem the element * @param focusable true to make focusable, false to make unfocusable */ protected void setFocusable(Element elem, boolean focusable) { if (focusable) { FocusImpl focusImpl = FocusImpl.getFocusImplForWidget(); focusImpl.setTabIndex(elem, getTabIndex()); if (accessKey != 0) { focusImpl.setAccessKey(elem, accessKey); } } else { // Chrome: Elements remain focusable after removing the tabIndex, so set // it to -1 first. elem.setTabIndex(-1); elem.removeAttribute("tabIndex"); elem.removeAttribute("accessKey"); } }
/** * Make an element focusable or not. * * @param elem the element * @param focusable true to make focusable, false to make unfocusable */ protected void setFocusable(Element elem, boolean focusable) { if (focusable) { FocusImpl focusImpl = FocusImpl.getFocusImplForWidget(); focusImpl.setTabIndex(elem, getTabIndex()); if (accessKey != 0) { focusImpl.setAccessKey(elem, accessKey); } } else { // Chrome: Elements remain focusable after removing the tabIndex, so set // it to -1 first. elem.setTabIndex(-1); elem.removeAttribute("tabIndex"); elem.removeAttribute("accessKey"); } }
cellParent.removeAttribute("accessKey"); } else { FocusImpl focusImpl = FocusImpl.getFocusImplForWidget(); focusImpl.setTabIndex(cellParent, tree.getTabIndex()); char accessKey = tree.getAccessKey();
cellParent.removeAttribute("accessKey"); } else { FocusImpl focusImpl = FocusImpl.getFocusImplForWidget(); focusImpl.setTabIndex(cellParent, tree.getTabIndex()); char accessKey = tree.getAccessKey();