com.google.gwt.dom.client.Element.getTabIndex()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(253)

本文整理了Java中com.google.gwt.dom.client.Element.getTabIndex()方法的一些代码示例,展示了Element.getTabIndex()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getTabIndex()方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:getTabIndex

Element.getTabIndex介绍

[英]The index that represents the element's position in the tabbing order.
[中]表示元素在选项卡顺序中的位置的索引。

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

  1. public int getTabIndex(Element elem) {
  2. return elem.getTabIndex();
  3. }

代码示例来源:origin: com.google.gwt/gwt-servlet

  1. /**
  2. * Check if an element is focusable. If an element is focusable, the cell
  3. * widget should not steal focus from it.
  4. *
  5. * @param elem the element
  6. * @return true if the element is focusable, false if not
  7. */
  8. public boolean isFocusable(Element elem) {
  9. return focusableTypes.contains(elem.getTagName().toLowerCase(Locale.ROOT))
  10. || elem.getTabIndex() >= 0;
  11. }

代码示例来源:origin: net.wetheinter/gwt-user

  1. public int getTabIndex(Element elem) {
  2. return elem.getTabIndex();
  3. }

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

  1. public int getTabIndex(Element elem) {
  2. return elem.getTabIndex();
  3. }

代码示例来源:origin: net.wetheinter/gwt-user

  1. /**
  2. * Check if an element is focusable. If an element is focusable, the cell
  3. * widget should not steal focus from it.
  4. *
  5. * @param elem the element
  6. * @return true if the element is focusable, false if not
  7. */
  8. public boolean isFocusable(Element elem) {
  9. return focusableTypes.contains(elem.getTagName().toLowerCase(Locale.ROOT))
  10. || elem.getTabIndex() >= 0;
  11. }

代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material-table

  1. /**
  2. * Check if an element is focusable. If an element is focusable, the cell
  3. * widget should not steal focus from it.
  4. *
  5. * @param elem the element
  6. * @return true if the element is focusable, false if not
  7. */
  8. public boolean isFocusable(Element elem) {
  9. return focusableTypes.contains(elem.getTagName().toLowerCase(Locale.ROOT))
  10. || elem.getTabIndex() >= 0;
  11. }

代码示例来源:origin: GwtMaterialDesign/gwt-material-table

  1. /**
  2. * Check if an element is focusable. If an element is focusable, the cell
  3. * widget should not steal focus from it.
  4. *
  5. * @param elem the element
  6. * @return true if the element is focusable, false if not
  7. */
  8. public boolean isFocusable(Element elem) {
  9. return focusableTypes.contains(elem.getTagName().toLowerCase(Locale.ROOT))
  10. || elem.getTabIndex() >= 0;
  11. }

代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit

  1. @Override
  2. public int getTabIndex() {
  3. return getFileInputElement().getTabIndex();
  4. }

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

  1. /**
  2. * Check if an element is focusable. If an element is focusable, the cell
  3. * widget should not steal focus from it.
  4. *
  5. * @param elem the element
  6. * @return true if the element is focusable, false if not
  7. */
  8. public boolean isFocusable(Element elem) {
  9. return focusableTypes.contains(StringCase.toLower(elem.getTagName()))
  10. || elem.getTabIndex() >= 0;
  11. }

代码示例来源:origin: jqm4gwt/jqm4gwt

  1. @Override
  2. protected void onLoad() {
  3. super.onLoad();
  4. if (!isEnabled()) {
  5. Element inputElt = getInputElt();
  6. if (savedTabIndex == null) savedTabIndex = inputElt.getTabIndex();
  7. inputElt.setTabIndex(-1);
  8. }
  9. }

代码示例来源:origin: jqm4gwt/jqm4gwt

  1. @Override
  2. protected void onLoad() {
  3. super.onLoad();
  4. Element inputElt = getInputElt();
  5. bindCreated(inputElt, this);
  6. if (!isEnabled()) {
  7. if (savedTabIndex == null) savedTabIndex = inputElt.getTabIndex();
  8. inputElt.setTabIndex(-1);
  9. }
  10. }

代码示例来源:origin: org.jboss.ballroom/widgets

  1. private void findFocusable(Element root, List<Element> focusable, boolean include)
  2. {
  3. NodeList<Node> children = root.getChildNodes();
  4. for(int i=0; i<children.getLength(); i++)
  5. {
  6. Node child = children.getItem(i);
  7. if(Node.ELEMENT_NODE == child.getNodeType())
  8. {
  9. Element childElement = (Element)child;
  10. //if(childElement.hasAttribute("focusable"))
  11. // includeChildren = childElement.getAttribute("focusable").equals("true");
  12. if(childElement.getTabIndex()>=0)
  13. {
  14. String tagName = childElement.getTagName();
  15. //System.out.println(tagName);
  16. for(String supported : SUPPORTED_TYPES)
  17. {
  18. if(tagName.equalsIgnoreCase(supported))
  19. {
  20. focusable.add(childElement);
  21. break;
  22. }
  23. }
  24. }
  25. findFocusable(childElement, focusable, include);
  26. }
  27. }
  28. }

代码示例来源:origin: jqm4gwt/jqm4gwt

  1. @Override
  2. public void setEnabled(boolean value) {
  3. boolean prevEnabled = isEnabled();
  4. super.setEnabled(value);
  5. if (prevEnabled == value) return;
  6. if (isAttached()) {
  7. Element inputElt = getInputElt();
  8. if (value) {
  9. if (savedTabIndex != null) {
  10. inputElt.setTabIndex(savedTabIndex);
  11. savedTabIndex = null;
  12. }
  13. } else {
  14. savedTabIndex = inputElt.getTabIndex();
  15. inputElt.setTabIndex(-1);
  16. }
  17. }
  18. }

代码示例来源:origin: jqm4gwt/jqm4gwt

  1. @Override
  2. public void setEnabled(boolean value) {
  3. boolean prevEnabled = isEnabled();
  4. super.setEnabled(value);
  5. if (prevEnabled == value) return;
  6. if (isAttached()) {
  7. Element inputElt = getInputElt();
  8. if (value) {
  9. if (savedTabIndex != null) {
  10. inputElt.setTabIndex(savedTabIndex);
  11. savedTabIndex = null;
  12. }
  13. } else {
  14. savedTabIndex = inputElt.getTabIndex();
  15. inputElt.setTabIndex(-1);
  16. }
  17. }
  18. }

相关文章

Element类方法