Package com.extjs.gxt.ui.client.event

Examples of com.extjs.gxt.ui.client.event.GridEvent


  @Override
  @SuppressWarnings({"unchecked", "rawtypes"})
  public void onComponentEvent(ComponentEvent ce) {
    super.onComponentEvent(ce);
    GridEvent ge = (GridEvent) ce;
    switch (ce.getEventTypeInt()) {
      case Event.ONCLICK:
        onClick(ge);
        break;
      case Event.ONDBLCLICK:
View Full Code Here


    this.view = view;
  }

  @Override
  protected ComponentEvent createComponentEvent(Event event) {
    GridEvent ge = new GridEvent(this, event);
    if (event != null) {
      ge.rowIndex = view.findRowIndex(event.getTarget());
      ge.colIndex = view.findCellIndex(event.getTarget(), null);
    }
    return ge;
View Full Code Here

      getView().ensureVisible(row, col, false);
      M m = store.getAt(row);
      activeRecord = store.getRecord(m);

      String field = cm.getDataIndex(col);
      GridEvent e = new GridEvent(this);
      e.model = m;
      e.property = field;
      e.rowIndex = row;
      e.colIndex = col;
      if (fireEvent(Events.BeforeEdit, e)) {
View Full Code Here

    activeEditor = null;
    ed.removeListener(Events.SpecialKey, editorListener);
    Record r = activeRecord;
    String field = cm.getDataIndex(ed.col);
    if ((value == null && startValue != null) || !value.equals(startValue)) {
      GridEvent ge = new GridEvent(this);
      ge.record = r;
      ge.property = field;
      ge.value = value;
      ge.startValue = startValue;
      ge.rowIndex = ed.row;
View Full Code Here

  }

  protected void onClick(ComponentEvent ce) {
    Element row = findRow(ce.getTarget());
    if (row != null) {
      GridEvent e = (GridEvent) ce;
      e.rowIndex = findRowIndex(row);
      grid.fireEvent(Events.RowClick, e);
    }
  }
View Full Code Here

    ModelData m = ds.getAt(row);
    if (m != null) {
      insertRows(ds, row, row, true);
      getRow(row).setPropertyInt("rowIndex", row);
      onRemove(ds, m, row + 1, true);
      GridEvent e = new GridEvent(grid);
      e.rowIndex = row;
      e.model = ds.getAt(row);
      fireEvent(Events.RowUpdated, e);
    }
  }
View Full Code Here

    if (state == null || state.getSortField() == null) {
      return;
    }
    if (this.sortState == null || (!this.sortState.getSortField().equals(state.getSortField()))
        || this.sortState.getSortDir() != state.getSortDir()) {
      GridEvent e = new GridEvent(grid);
      e.sortInfo = state;
      grid.fireEvent(Events.SortChange, e);
    }
    this.sortState = state;
    int sortColumn = cm.findColumnIndex(state.getSortField());
View Full Code Here

      fly(hd).addStyleName("x-grid3-hd-menu-open");

      int colIndex = findHeaderIndex(e.getTarget());
      menu = createContextMenu(colIndex);

      GridEvent ge = new GridEvent(grid);
      ge.colIndex = colIndex;
      ge.menu = menu;
      if (!grid.fireEvent(Events.HeaderContextMenu, ge)) {
        return;
      }
View Full Code Here

      updateAllColumnWidths();
    } else {
      updateColumnWidth(colIndex, width);
    }

    GridEvent e = new GridEvent(grid);
    e.colIndex = colIndex;
    e.width = width;
    grid.fireEvent(Events.ColumnResize, e);
  }
View Full Code Here

    innerHd.setScrollLeft(scroller.getScrollLeft());
  }

  private void syncScroll() {
    syncHeaderScroll();
    GridEvent ge = new GridEvent(grid);
    ge.scrollLeft = scroller.getScrollLeft();
    ge.scrollTop = scroller.getScrollTop();
    grid.fireEvent(Events.BodyScroll, ge);
  }
View Full Code Here

TOP

Related Classes of com.extjs.gxt.ui.client.event.GridEvent

Copyright © 2018 www.massapicom. 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.