Package com.google.gwt.dom.client

Examples of com.google.gwt.dom.client.Element.focus()


      char accessKey = tree.getAccessKey();
      if (accessKey != 0) {
        focusImpl.setAccessKey(cellParent, accessKey);
      }
      if (stealFocus && !tree.cellIsEditing) {
        cellParent.focus();
      }
    }

    // Update the selection model.
    if (KeyboardSelectionPolicy.BOUND_TO_SELECTION == tree.getKeyboardSelectionPolicy()) {
View Full Code Here


                }
            }

            if(match!=null)
            {
                match.focus();
                index =i;
                break;
            }
        }
View Full Code Here

        boolean preventDefault = true;
        if (Element.is(target)) {
            Element ele = Element.as(target);
            //INPUT element will not get focus if default action is prevented.
            if (Utils.isHtmlFormControl(ele)) {
                ele.focus();
                preventDefault = false;
            }
            _touchTarget = ele;
        }
        else {
View Full Code Here

    if (!selected || isFocused || stealFocus) {
      setStyleName(elem, style.cellListKeyboardSelectedItem(), selected);
    }
    setFocusable(elem, selected);
    if (selected && stealFocus && !cellIsEditing) {
      elem.focus();
      onFocus();
    }
  }

  /**
 
View Full Code Here

  public void setFocus(boolean focused) {
    Element elem = getKeyboardSelectedElement();
    if (elem != null) {
      if (focused) {
        elem.focus();
      } else {
        elem.blur();
      }
    }
  }
View Full Code Here

        CellBasedWidgetImpl.get().resetFocus(new Scheduler.ScheduledCommand() {
          public void execute() {
            if (!hasData.resetFocusOnCell()) {
              Element elem = hasData.getKeyboardSelectedElement();
              if (elem != null) {
                elem.focus();
              }
            }
          }
        });
      }
View Full Code Here

      // Move focus to the cell.
      if (selected && stealFocus && !cellIsEditing && isKeyboardSelected) {
        CellBasedWidgetImpl.get().resetFocus(new Scheduler.ScheduledCommand() {
          @Override
          public void execute() {
            focusable.focus();
          }
        });
      }
    }
  }
View Full Code Here

      char accessKey = tree.getAccessKey();
      if (accessKey != 0) {
        focusImpl.setAccessKey(cellParent, accessKey);
      }
      if (stealFocus && !tree.cellIsEditing) {
        cellParent.focus();
      }
    }

    // Update the selection model.
    if (KeyboardSelectionPolicy.BOUND_TO_SELECTION == tree.getKeyboardSelectionPolicy()) {
View Full Code Here

    if (item != null) {
      Element child = item.getFirstChildElement().getFirstChildElement();
      child.addClassName(tree.getStyle().keyboardSelectedItem());
      child.setTabIndex(0);
      if (focus) {
        child.focus();
      }
      keyboardSelection = item;
      keyboardFocused = focus;
    }
  }
View Full Code Here

    }

    public void setFocus(Element parent, boolean focused) {
      Element focusable = parent.getFirstChildElement().cast();
      if (focused) {
        focusable.focus();
      } else {
        focusable.blur();
      }
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.