本文整理了Java中com.google.gwt.dom.client.Element.setTabIndex()
方法的一些代码示例,展示了Element.setTabIndex()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.setTabIndex()
方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:setTabIndex
[英]The index that represents the element's position in the tabbing order.
[中]表示元素在选项卡顺序中的位置的索引。
代码示例来源:origin: com.google.gwt/gwt-servlet
public void setTabIndex(Element elem, int index) {
elem.setTabIndex(index);
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public R tabIndex(int tabIndex) {
assertCanAddAttribute().setTabIndex(tabIndex);
return getReturnBuilder();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
public Element createFocusable() {
Element e = Document.get().createDivElement().cast();
e.setTabIndex(0);
return e;
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* 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");
}
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
public void setTabIndex(Element elem, int index) {
elem.setTabIndex(index);
}
}
代码示例来源:origin: net.wetheinter/gwt-user
public void setTabIndex(Element elem, int index) {
elem.setTabIndex(index);
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
protected void updateTabIndex() {
if (editor != null) {
Element textAreaElement = getTextAreaElement();
if (enabled && !readOnly) {
textAreaElement.setTabIndex(tabIndex);
} else {
textAreaElement.setTabIndex(-1);
}
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
cellParent.setTabIndex(-1);
cellParent.removeAttribute("tabIndex");
cellParent.removeAttribute("accessKey");
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
@Override
public void setTabIndex(int index) {
getFileInputElement().setTabIndex(index);
}
代码示例来源:origin: net.wetheinter/gwt-user
@Override
public R tabIndex(int tabIndex) {
assertCanAddAttribute().setTabIndex(tabIndex);
return getReturnBuilder();
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
@Override
public R tabIndex(int tabIndex) {
assertCanAddAttribute().setTabIndex(tabIndex);
return getReturnBuilder();
}
代码示例来源:origin: net.wetheinter/gwt-user
public Element createFocusable() {
Element e = Document.get().createDivElement().cast();
e.setTabIndex(0);
return e;
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
public Element createFocusable() {
Element e = Document.get().createDivElement().cast();
e.setTabIndex(0);
return e;
}
代码示例来源:origin: jqm4gwt/jqm4gwt
@Override
public void setEnabled(boolean value) {
boolean prevEnabled = isEnabled();
super.setEnabled(value);
if (prevEnabled == value) return;
if (isAttached()) {
Element inputElt = getInputElt();
if (value) {
if (savedTabIndex != null) {
inputElt.setTabIndex(savedTabIndex);
savedTabIndex = null;
}
} else {
savedTabIndex = inputElt.getTabIndex();
inputElt.setTabIndex(-1);
}
}
}
代码示例来源:origin: jqm4gwt/jqm4gwt
@Override
public void setEnabled(boolean value) {
boolean prevEnabled = isEnabled();
super.setEnabled(value);
if (prevEnabled == value) return;
if (isAttached()) {
Element inputElt = getInputElt();
if (value) {
if (savedTabIndex != null) {
inputElt.setTabIndex(savedTabIndex);
savedTabIndex = null;
}
} else {
savedTabIndex = inputElt.getTabIndex();
inputElt.setTabIndex(-1);
}
}
}
代码示例来源:origin: jqm4gwt/jqm4gwt
@Override
protected void onLoad() {
super.onLoad();
if (!isEnabled()) {
Element inputElt = getInputElt();
if (savedTabIndex == null) savedTabIndex = inputElt.getTabIndex();
inputElt.setTabIndex(-1);
}
}
代码示例来源:origin: jqm4gwt/jqm4gwt
@Override
public void setTabIndex(int value) {
if (isAttached()) {
if (isEnabled()) {
getInputElt().setTabIndex(value);
savedTabIndex = null;
} else {
savedTabIndex = value;
}
} else {
input.setTabIndex(value);
JQMCommon.setAttribute(getInputElt(), "tabindex", String.valueOf(value));
}
}
代码示例来源:origin: jqm4gwt/jqm4gwt
@Override
public void setTabIndex(int value) {
if (isAttached()) {
if (isEnabled()) {
getInputElt().setTabIndex(value);
savedTabIndex = null;
} else {
savedTabIndex = value;
}
} else {
input.setTabIndex(value);
JQMCommon.setAttribute(getInputElt(), "tabindex", String.valueOf(value));
}
}
代码示例来源:origin: jqm4gwt/jqm4gwt
@Override
protected void onLoad() {
super.onLoad();
Element inputElt = getInputElt();
bindCreated(inputElt, this);
if (!isEnabled()) {
if (savedTabIndex == null) savedTabIndex = inputElt.getTabIndex();
inputElt.setTabIndex(-1);
}
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* 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");
}
}
内容来源于网络,如有侵权,请联系作者删除!