Exemple #1
0
  @Override
  protected void renderUI() {
    super.renderUI();
    scroller.setStyleAttribute("overflowY", "hidden");
    liveScroller =
        grid.el()
            .insertFirst(
                "<div class=\"x-livegrid-scroller\"><div style=\"width: "
                    + XDOM.getScrollBarWidth()
                    + "px;\">&nbsp;</div></div>");
    positionLiveScroller();

    liveScroller.addEventsSunk(Event.ONSCROLL);
    mainBody.addEventsSunk(Event.ONMOUSEWHEEL);
  }
  /** Creates the underlying file input. */
  private void createFileInput() {

    if (file != null) {
      el().removeChild(file.dom);
    }

    final InputElement fileElement = Document.get().createFileInputElement();

    file = new El((Element) fileElement.cast());
    file.addEventsSunk(Event.ONCHANGE | Event.FOCUSEVENTS);
    file.setId(XDOM.getUniqueId());
    file.addStyleName("x-form-file");
    file.setTabIndex(-1);
    getFileInput().setName(name);
    getFileInput().setAccept(accept);
    file.insertInto(getElement(), 1);
    if (file != null) {
      file.setEnabled(isEnabled());
    }
  }