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

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


    child.setParent(this);
  }

  @SuppressWarnings({"rawtypes", "unchecked"})
  protected ContainerEvent createContainerEvent(T item) {
    return new ContainerEvent(this, item);
  }
View Full Code Here


    return remove(item, false);
  }

  @SuppressWarnings({"unchecked", "rawtypes"})
  protected boolean remove(T component, boolean force) {
    ContainerEvent containerEvent = createContainerEvent(component);
    containerEvent.setItem(component);
    containerEvent.setIndex(indexOf(component));
    if (fireEvent(Events.BeforeRemove, containerEvent) || force) {
      ComponentEvent componentEvent = component.createComponentEvent(null);
      if (component.fireEvent(Events.BeforeOrphan, componentEvent) || force) {
        onRemove(component);
View Full Code Here

    }
    return null;
  }

  protected void fireSelectionChanged() {
    ContainerEvent event = createContainerEvent(container);
    event.selected = getSelectedItems();
    container.fireEvent(Events.SelectionChange, event);
  }
View Full Code Here

        fireSelectionChanged();
      }
    } else {
      T item = items.getItem(container);
      if (item != null) {
        ContainerEvent ce = createContainerEvent(container);
        ce.item = item;
        if (container.fireEvent(Events.BeforeSelect, ce)) {
          if (!keepExisting) {
            deselectAll(true);
          }
View Full Code Here

      doSelect(new Items(item), false, false);
    }
  }

  protected void fireSelectionChanged() {
    ContainerEvent event = createContainerEvent(container);
    event.selected = getSelectedItems();
    event.event = DOM.eventGetCurrentEvent();
    container.fireEvent(Events.SelectionChange, event);
  }
View Full Code Here

  protected void adopt(T child) {
    setParent(this, child);
  }

  protected ContainerEvent createContainerEvent(T item) {
    return new ContainerEvent(this, item);
  }
View Full Code Here

      } else {
        c.recalculate();
      }
    }

    ContainerEvent ce = new ContainerEvent(this);
    fireEvent(Events.AfterLayout, ce);
    return true;
  }
View Full Code Here

   *
   * @param item the item to insert
   * @param index the insert location
   */
  protected boolean insert(T item, int index) {
    ContainerEvent containerEvent = createContainerEvent(item);
    containerEvent.index = index;
    if (fireEvent(Events.BeforeAdd, containerEvent)) {
      ComponentEvent componentEvent = item.createComponentEvent(null);
      if (item.fireEvent(Events.BeforeAdopt, componentEvent)) {
        index = adjustIndex(item, index);
View Full Code Here

  protected boolean remove(T item) {
    return remove(item, false);
  }

  protected boolean remove(T component, boolean force) {
    ContainerEvent containerEvent = createContainerEvent(component);
    containerEvent.item = component;
    containerEvent.index = indexOf(component);
    if (fireEvent(Events.BeforeRemove, containerEvent) || force) {
      ComponentEvent componentEvent = component.createComponentEvent(null);
      if (component.fireEvent(Events.BeforeOrphan, componentEvent) || force) {
View Full Code Here

    child.setParent(this);
  }

  @SuppressWarnings({"rawtypes", "unchecked"})
  protected ContainerEvent createContainerEvent(T item) {
    return new ContainerEvent(this, item);
  }
View Full Code Here

TOP

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

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.