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

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


      focus();
    }

    setZIndex(XDOM.getTopZIndex());

    fireEvent(Events.Open, new ComponentEvent(this));
  }
View Full Code Here


   */
  protected boolean insert(T item, int index) {
    ContainerEvent<?, ?> containerEvent = createContainerEvent(item);
    containerEvent.setIndex(index);
    if (fireEvent(Events.BeforeAdd, containerEvent)) {
      ComponentEvent componentEvent = item.createComponentEvent(null);
      if (item.fireEvent(Events.BeforeAdopt, componentEvent)) {
        index = adjustIndex(item, index);
        item.removeFromParent();
        if (item.isRendered()) {
          // make sure to detach it from the dom first
View Full Code Here

  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);

        if (attachChildren) {
          assert component.getParent() == this :"component is not a child of this container";
View Full Code Here

    if (GXT.isAriaEnabled()) {
      Accessibility.setState(getElement(), "aria-expanded", "false");
      collapseBtn.setTitle(GXT.MESSAGES.panel_expandPanel());
    }

    ComponentEvent ce = new ComponentEvent(this);
    fireEvent(Events.Collapse, ce);
  }
View Full Code Here

    if (GXT.isAriaEnabled()) {
      Accessibility.setState(getElement(), "aria-expanded", "true");
      collapseBtn.setTitle(GXT.MESSAGES.panel_collapsePanel());
    }

    ComponentEvent ce = new ComponentEvent(this);
    fireEvent(Events.Expand, ce);
  }
View Full Code Here

    grid.setCellPadding(0);
    grid.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        Event evt = DOM.eventGetCurrentEvent();
        ComponentEvent be = new ComponentEvent(DatePicker.this, evt);
        onDayClick(be);
      }
    });
    String s = GXT.isAriaEnabled() ? "<a role=gridcell tabindex=0><span role=presentation></span></a>"
        : "<a href=#><span></span></a>";
View Full Code Here

      case Event.ONFOCUS:
        onFocus(ce);
        break;
      case Event.ONBLUR:
        if (inEditor && GXT.isWindows && GXT.isGecko) {
          final ComponentEvent e = ce;
          DeferredCommand.addCommand(new Command() {
            public void execute() {
              onBlur(e);
            }
          });
View Full Code Here

   * @param type the event type
   * @return <code>false</code> if any listeners return <code>false</code>
   */
  public boolean fireEvent(EventType type) {
    if (disableEvents) return true;
    ComponentEvent be = createComponentEvent(null);
    be.setType(type);
    return fireEvent(type, be);
  }
View Full Code Here

      if ("input".equalsIgnoreCase(getElement().getTagName()) || eventTarget.getPropertyString("__eventBits") == null) {
        focus();
      }
    }

    ComponentEvent ce = createComponentEvent(event);
    ce.setEvent(event);

    // browser event listeners can cancel event
    if (!fireEvent(Events.BrowserEvent, ce)) {
      return;
    }

    EventType eventType = Events.lookupBrowserEvent(type);
    ce.setType(eventType);

    if (type == Event.ONCONTEXTMENU) {
      if (disableContextMenu) {
        event.preventDefault();
      }
      onRightClick(ce);
    }

    // specialized support for mouse overs
    if (overElements != null && (type == Event.ONMOUSEOVER || type == Event.ONMOUSEOUT)) {
      Element target = ce.getTarget();
      if (target != null) {
        String style = overElements.get(target.getId());
        if (style != null) {
          fly(target).setStyleName(style, type == Event.ONMOUSEOVER);
        }
View Full Code Here

   * <code>StateManager</code> and saving it using the state id or component id
   * as the key.
   */
  public void saveState() {
    if (stateful && state != null) {
      ComponentEvent ce = createComponentEvent(null);
      ce.setState(state);
      if (fireEvent(Events.BeforeStateSave, ce)) {
        String sid = stateId != null ? stateId : getId();
        StateManager.get().set(sid, state);
        fireEvent(Events.StateSave, ce);
      }
View Full Code Here

TOP

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

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.