Examples of EventType


Examples of com.dongxuexidu.douban4j.service.DoubanEventService.EventType

   * Test of postNewEvent method, of class DoubanEventService.
   */
  public void testPostNewEvent() throws Exception {
    System.out.println("postNewEvent");
    String title = "Test from Dongxuexidu";
    EventType type = EventType.Salon;
    String content = "Test from Dongxuexidu";
    boolean inviteOnly = true;
    boolean canInvite = false;
    Date startTime = new Date();
    Calendar cal = Calendar.getInstance();
View Full Code Here

Examples of com.eclipsesource.tabris.tracking.TrackingEvent.EventType

  @Test
  public void testHasType() {
    TrackingEvent event = new TrackingEvent( EventType.PAGE_VIEW, mock( TrackingInfo.class ), new Object(), 1 );

    EventType type = event.getType();

    assertSame( EventType.PAGE_VIEW, type );
  }
View Full Code Here

Examples of com.espertech.esper.client.EventType

  }

  private Map<String, Object> constructPropertyTypes(String eventTypeName, Map<String, Object> propertyTypesGiven, EventAdapterService eventAdapterService)
  {
    Map<String, Object> propertyTypes = new HashMap<String, Object>();
    EventType eventType = eventAdapterService.getExistsTypeByName(eventTypeName);
    if(eventType == null)
    {
      if(propertyTypesGiven != null)
      {
        eventAdapterService.addNestableMapType(eventTypeName, new HashMap<String, Object>(propertyTypesGiven), null, true, true, true, false, false);
      }
      return propertyTypesGiven;
    }
    if(!eventType.getUnderlyingType().equals(Map.class))
    {
            beanClass = eventType.getUnderlyingType();
    }
    if(propertyTypesGiven != null && eventType.getPropertyNames().length != propertyTypesGiven.size())
    {
      // allow this scenario for beans as we may want to bring in a subset of properties
      if (beanClass != null) {
        return propertyTypesGiven;
      }
      else {
        throw new EPException("Event type " + eventTypeName + " has already been declared with a different number of parameters");
      }
    }
    for(String property : eventType.getPropertyNames())
    {
            Class type;
            try {
                type = eventType.getPropertyType(property);
            }
            catch (PropertyAccessException e) {
                // thrown if trying to access an invalid property on an EventBean
                throw new EPException(e);
            }
      if(propertyTypesGiven != null && propertyTypesGiven.get(property) == null)
      {
        throw new EPException("Event type " + eventTypeName + "has already been declared with different parameters");
      }
      if(propertyTypesGiven != null && !propertyTypesGiven.get(property).equals(type))
      {
        throw new EPException("Event type " + eventTypeName + "has already been declared with a different type for property " + property);
      }
            // we can't set read-only properties for bean
            if(!eventType.getUnderlyingType().equals(Map.class)) {
              PropertyDescriptor[] pds = ReflectUtils.getBeanProperties(beanClass);
              PropertyDescriptor pd = null;
              for (PropertyDescriptor p :pds) {
                if (p.getName().equals(property))
                  pd = p;
View Full Code Here

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

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

    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

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

  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

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

* 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

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

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

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

    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

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

* @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
TOP
Copyright © 2018 www.massapi.com. 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.