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

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


   * @param deep true to close all parent menus
   * @return this
   */
  public Menu hide(boolean deep) {
    if (showing) {
      MenuEvent me = new MenuEvent(this);
      if (fireEvent(Events.BeforeHide, me)) {
        if (activeItem != null) {
          activeItem.deactivate();
          activeItem = null;
        }
View Full Code Here


   * @param pos the {@link El#alignTo} anchor position to use in aligning to the
   *          element (defaults to defaultAlign)
   * @param offsets the menu align offsets
   */
  public void show(Element elem, String pos, int[] offsets) {
    MenuEvent me = new MenuEvent(this);
    if (fireEvent(Events.BeforeShow, me)) {
      RootPanel.get().add(this);

      el().makePositionable(true);

View Full Code Here

   *
   * @param x the x coordinate
   * @param y the y coordinate
   */
  public void showAt(int x, int y) {
    MenuEvent me = new MenuEvent(this);
    if (fireEvent(Events.BeforeShow, me)) {
      RootPanel.get().add(this);

      el().makePositionable(true);

View Full Code Here

    ul.setScrollTop(0);
  }

  @Override
  protected ComponentEvent createComponentEvent(Event event) {
    return new MenuEvent(this);
  }
View Full Code Here

    return new MenuEvent(this);
  }

  @Override
  protected ContainerEvent<Menu, Component> createContainerEvent(Component item) {
    return new MenuEvent(this, item);
  }
View Full Code Here

  protected boolean onAutoHide(PreviewEvent pe) {
    if ((pe.getEventTypeInt() == Event.ONMOUSEDOWN || pe.getEventTypeInt() == Event.ONMOUSEWHEEL
        || pe.getEventTypeInt() == Event.ONSCROLL || pe.getEventTypeInt() == Event.ONKEYPRESS)
        && !(pe.within(getElement()) || (fly(pe.getTarget()).findParent(".x-ignore", -1) != null))) {
      MenuEvent me = new MenuEvent(this);
      me.setEvent(pe.getEvent());
      if (fireEvent(Events.AutoHide, me)) {
        hide(true);
        return true;
      }
    }
View Full Code Here

    El li = el().getParent();
    if (li != null) {
      li.addStyleName(activeStyle);
    }
    MenuEvent me = new MenuEvent(parentMenu);
    me.setItem(this);
    fireEvent(Events.Activate, me);
  }
View Full Code Here

  protected void deactivate() {
    El li = el().getParent();
    if (li != null) {
      li.removeStyleName(activeStyle);
    }
    MenuEvent me = new MenuEvent(parentMenu);
    me.setItem(this);
    fireEvent(Events.Deactivate, me);
  }
View Full Code Here

    }
  }

  protected void onClick(ComponentEvent be) {
    be.stopEvent();
    MenuEvent me = new MenuEvent(parentMenu);
    me.setItem(this);
    me.setEvent(be.getEvent());
    if (!disabled && fireEvent(Events.Select, me)) {
      handleClick(be);
    }
  }
View Full Code Here

  public void setChecked(boolean state, boolean supressEvent) {
    if (!rendered) {
      this.checked = state;
      return;
    }
    MenuEvent me = new MenuEvent(parentMenu);
    me.setItem(this);
    me.setChecked(state);
    if (supressEvent || fireEvent(Events.BeforeCheckChange, me)) {

      if (getGroup() == null) {
        setIcon(state ? GXT.IMAGES.checked() : GXT.IMAGES.unchecked());
        el().setStyleName("x-menu-checked", state);
View Full Code Here

TOP

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

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.