Package net.mygwt.ui.client.event

Examples of net.mygwt.ui.client.event.Listener


    }

    if (animate) {
      FXStyle fx = new FXStyle(getElement());
      fx.duration = animateDuration;
      fx.addListener(Events.EffectComplete, new Listener() {
        public void handleEvent(BaseEvent be) {
          afterHide();
        }
      });
      fx.fadeOut();
View Full Code Here


    final Shell fShell = this;

    if (animate) {
      FXStyle fx = new FXStyle(getElement());
      if (shadow != null) {
        fx.addListener(Events.EffectComplete, new Listener() {
          public void handleEvent(BaseEvent be) {
            shadow.show(fShell);
            afterShow();
          }
        });
View Full Code Here

    // close button
    if ((style & Style.CLOSE) != 0) {
      closeBtn = new IconButton("my-tool-close");
      closeBtn.addStyleName("my-tool");
      closeBtn.addListener(Events.Click, new Listener() {
        public void handleEvent(BaseEvent be) {
          close();
        }
      });
      header.addButton(closeBtn);
      closeBtn.removeStyleName("my-tool");
    }

    if ((style & Style.AUTO_HIDE) != 0) {
      autoHidePreview = new EventPreview() {
        public boolean onEventPreview(Event event) {
          Element target = DOM.eventGetTarget(event);
          if (DOM.isOrHasChild(getElement(), target)) {
            return true;
          }
          if (DOM.eventGetType(event) == Event.ONCLICK) {
            close();
          }
          return false;
        }
      };
    }

    // resizable
    if ((style & Style.RESIZE) != 0) {
      resizer = new Resizable(this);
      resizer.minWidth = 200;
      resizer.minHeight = 100;
    }

    if ((style & Style.MODAL) != 0) {
      modal = new ModalPanel();
    }

    dragListener = new Listener() {
      public void handleEvent(BaseEvent be) {
        switch (be.type) {
          case Events.DragStart:
            if (shadow != null) {
              shadow.setVisible(false);
View Full Code Here

  protected void initEvents() {
    item.addListener(Events.Click, clickListener);
    item.addListener(Events.DoubleClick, clickListener);

    // checkbox
    item.addListener(Events.Click, checkEl, new Listener() {
      public void handleEvent(BaseEvent be) {
        be.stopEvent();
        item.setChecked(!item.isChecked());
      }
    });
View Full Code Here

  }

  void animCollapse() {
    FXStyle fx = new FXStyle(containerEl);
    fx.duration = 300;
    fx.addListener(Events.EffectComplete, new Listener() {
      public void handleEvent(BaseEvent be) {
        afterCollapse();
      }
    });
    item.disable();
View Full Code Here

  }

  void animExpand() {
    FXStyle fx = new FXStyle(containerEl);
    fx.duration = 300;
    fx.addListener(Events.EffectComplete, new Listener() {
      public void handleEvent(BaseEvent be) {
        afterExpand();
      }
    });
    item.disable();
View Full Code Here

  protected TreeItem selItem;
  protected TreeItem lastSelItem;
  protected Listener treeListener;

  public TreeSelectionModel() {
    treeListener = new Listener() {
      public void handleEvent(BaseEvent be) {
        int type = be.type;
        TreeItem item = (TreeItem) be.widget;
        switch (type) {
          case Events.MouseDown:
View Full Code Here

    if (cfg.south) create(Style.SOUTH, "s");
    if (cfg.southEast) create(Style.SE, "se");
    if (cfg.east) create(Style.EAST, "e");

    listener = new Listener() {
      public void handleEvent(BaseEvent be) {
        switch (be.type) {
          case Events.Attach:
            onAttach();
            break;
View Full Code Here

    collapseBtn.changeStyle("my-tool-down");
    if (animateCollapse && !animating) {
      animating = true;
      FXStyle fx = new FXStyle(body.getElement());
      fx.duration = 300;
      fx.addListener(Events.EffectComplete, new Listener() {
        public void handleEvent(BaseEvent be) {
          afterCollapse();
        }
      });
      fx.slideOut(Style.NORTH);
View Full Code Here

    collapseBtn.changeStyle("my-tool-up");
    if (animateCollapse && !animating) {
      animating = true;
      FXStyle fx = new FXStyle(body.getElement());
      fx.duration = 300;
      fx.addListener(Events.EffectComplete, new Listener() {
        public void handleEvent(BaseEvent be) {
          afterExpand();
        }
      });
      fx.slideIn(Style.SOUTH);
View Full Code Here

TOP

Related Classes of net.mygwt.ui.client.event.Listener

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.