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

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


    int index = table.getView().findCellIndex(target);
    if (index == Style.DEFAULT) {
      return;
    }

    TableEvent te = new TableEvent(table);
    te.item = this;
    te.rowIndex = table.indexOf(this);
    te.cellIndex = index;
    te.event = ce.event;
View Full Code Here


    int index = table.getView().findCellIndex(target);
    if (index == Style.DEFAULT) {
      return;
    }
    TableEvent evt = new TableEvent(table);
    evt.item = this;
    evt.rowIndex = table.indexOf(this);
    evt.cellIndex = index;

    table.fireEvent(Events.CellDoubleClick, evt);
View Full Code Here

      TreeTableEvent tte = new TreeTableEvent((TreeTable) table);
      tte.columnIndex = columnUI.index;
      tte.event = e.event;
      be = tte;
    } else {
      TableEvent ce = new TableEvent((Table) table);
      ce.columnIndex = columnUI.index;
      ce.event = e.event;
      be = ce;
    }
View Full Code Here

    columns.setSubMenu(columnMenu);
    menu.add(columns);
   
    if (table instanceof Table) {
      TableEvent e = new TableEvent((Table)table);
      e.columnIndex = column.getIndex();
      e.menu = menu;
      ((Table)table).fireEvent(Events.HeaderContextMenu, e);
    }
View Full Code Here

   * @param index the column index
   * @param sortDir the direction to sort (NONE, ASC, DESC)
   */
  public void sort(int index, SortDir sortDir) {
    if (rendered) {
      TableEvent te = new TableEvent(this);
      te.columnIndex = index;
      te.sortDir = sortDir;
      if (fireEvent(Events.SortChange, te)) {
        getTableHeader().sort(index, sortDir);
        getView().sort(index, sortDir);
View Full Code Here

    }
  }

  @Override
  protected ComponentEvent createComponentEvent(Event event) {
    return new TableEvent(this, (event == null) ? null : findItem(DOM.eventGetTarget(event)));
  }
View Full Code Here

    return new TableEvent(this, (event == null) ? null : findItem(DOM.eventGetTarget(event)));
  }

  @Override
  protected ContainerEvent createContainerEvent(TableItem item) {
    return new TableEvent(this, item);
  }
View Full Code Here

  private void fireColumnModelEvent(EventType type) {
    if (cm != null) {
      Object obj = cm.getTable();
      if (obj instanceof Table) {
        TableEvent e = new TableEvent((Table) obj);
        e.setColumnIndex(index);
        cm.fireEvent(type, e);
      } else {
        TreeTableEvent e = new TreeTableEvent((TreeTable) obj);
        e.setColumnIndex(index);
        cm.fireEvent(type, e);
      }
    }
  }
View Full Code Here

   * @param index the column index
   * @param sortDir the direction to sort (NONE, ASC, DESC)
   */
  public void sort(int index, SortDir sortDir) {
    if (rendered) {
      TableEvent te = new TableEvent(this);
      te.setColumnIndex(index);
      te.setSortDir(sortDir);
      if (fireEvent(Events.SortChange, te)) {
        getTableHeader().sort(index, sortDir);
        getView().sort(index, sortDir);
      }
    } else {
View Full Code Here

    }
  }

  @Override
  protected ComponentEvent createComponentEvent(Event event) {
    TableEvent te = new TableEvent(this);
    te.setEvent(event);
    if (view != null && event != null) {
      Element target = event.getEventTarget().cast();
      int idx = view.findRowIndex(target);
      if (idx != -1) {
        te.setItem(idx != -1 ? getItem(idx) : null);
        te.setCellIndex(view.findCellIndex(target));
      }
    }
    return te;
  }
View Full Code Here

TOP

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

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.