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

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


  @Override
  public void initTarget(Component target) {
    if (listener == null) {
      listener = new Listener<ComponentEvent>() {
        public void handleEvent(ComponentEvent be) {
          EventType type = be.getType();
          if (type == Events.OnMouseOver) {
            onTargetOver(be);
          } else if (type == Events.OnMouseOut) {
            onTargetOut(be);
          } else if (type == Events.OnMouseMove) {
View Full Code Here


    this.target = target;
    if (listener == null) {
      listener = new Listener<ComponentEvent>() {
        public void handleEvent(ComponentEvent be) {
          Element source = target.getElement();
          EventType type = be.getType();
          if (type == Events.OnMouseOver) {
            EventTarget from = be.getEvent().getRelatedEventTarget();
            if (from == null
                || (Element.is(source) && Element.is(from) && !DOM.isOrHasChild(source, (Element) Element.as(from)))) {
              onTargetOver(be);
View Full Code Here

  public SelectionMode getSelectionMode() {
    return mode;
  }

  public void handleEvent(ContainerEvent e) {
    EventType type = e.getType();
    if (type == Events.OnMouseDown) {
      onMouseDown(e);
    } else if (type == Events.OnDoubleClick) {
      onDoubleClick(e);
    } else if (type == Events.Remove) {
View Full Code Here

* Store event listener.
*/
public class StoreListener<M extends ModelData> implements Listener<StoreEvent<M>> {

  public void handleEvent(StoreEvent<M> e) {
    EventType type = e.getType();
    if (type == Store.Add) {
      storeAdd(e);
    } else if (type == Store.Clear) {
      storeClear(e);
    } else if (type == Store.BeforeDataChanged) {
View Full Code Here

        }
      }
    });
    Listener<TreeEvent> l = new Listener<TreeEvent>() {
      public void handleEvent(TreeEvent te) {
        EventType type = te.getType();
        if (type == Events.BeforeExpand) {
          onBeforeExpand(te);
        } else if (type == Events.Collapse) {
          onCollapse(te);
        }
View Full Code Here

    this.resizeWidget = resizeWidget;
    this.resizeEl = resizeWidget.el();

    listener = new Listener<ComponentEvent>() {
      public void handleEvent(ComponentEvent e) {
        EventType type = e.getType();
        if (type == Events.Attach) {
          if (!disabled) {
            resizeEl.getParent().insertLast(getElement());
            ComponentHelper.doAttach(SplitBar.this);
            sync();
            attachedBars.add(SplitBar.this);
          }
        } else if (type == Events.Detach) {
          if (!disabled) {
            removeSplitBar();
          }
        } else if (type == Events.Resize || type == Events.Move) {
          delay.delay(400);
        }
      }
    };

    if (style == LayoutRegion.SOUTH || style == LayoutRegion.NORTH) {
      setStyleName("x-hsplitbar");
    } else {
      setStyleName("x-vsplitbar");
    }

    resizeWidget.addListener(Events.Attach, listener);
    resizeWidget.addListener(Events.Detach, listener);
    resizeWidget.addListener(Events.Resize, listener);
    resizeWidget.addListener(Events.Move, listener);

    draggable = new Draggable(this);
    draggable.setUpdateZIndex(false);
    draggable.setStartDragDistance(0);
    draggable.setProxyStyle("x-splitbar-proxy");

    Listener<DragEvent> dragListener = new Listener<DragEvent>() {
      public void handleEvent(DragEvent e) {
        EventType type = e.getType();
        if (type == Events.DragStart) {
          onStartDrag(e);
        } else if (type == Events.DragEnd) {
          onEndDrag(e);
        } else if (type == Events.DragCancel) {
View Full Code Here

* @see KeyNav
*/
public class KeyNavListener implements Listener<ComponentEvent> {

  public void handleEvent(ComponentEvent e) {
    EventType type = e.getType();
    switch (type.getEventCode()) {
      case KeyCodes.KEY_DELETE:
        onDelete(e);
        break;
      case KeyCodes.KEY_DOWN:
        onDown(e);
View Full Code Here

* Event listener for dispatcher events.
*/
public class DispatcherListener implements Listener<MvcEvent> {

  public void handleEvent(MvcEvent e) {
    EventType type = e.getType();
    if (type == Dispatcher.BeforeDispatch) {
      beforeDispatch(e);
    } else if (type == Dispatcher.AfterDispatch) {
      afterDispatch(e);
    }
View Full Code Here

    this.resize = resize;
    this.handles = handles;

    listener = new Listener<ComponentEvent>() {
      public void handleEvent(ComponentEvent e) {
        EventType type = e.getType();
        if (type == Events.Render) {
          init();
        } else if (type == Events.Attach) {
          onAttach();
        } else if (type == Events.Detach) {
View Full Code Here

    }
  }

  @SuppressWarnings("unchecked")
  public void handleEvent(BaseEvent e) {
    EventType type = e.getType();
    if (type == Events.RowMouseDown) {
      handleMouseDown((GridEvent) e);
    } else if (type == Events.RowClick) {
      handleMouseClick((GridEvent) e);
    } else if (type == Events.RowUpdated) {
View Full Code Here

TOP

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

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.