Examples of Event


Examples of com.google.api.services.calendar.model.Event

    }


    private static void addEvent(Calendar calendar) throws IOException {
      View.header("Add Event");
      Event event = newEvent();
      Event result = client.events().insert(calendar.getId(), event).execute();
      View.display(result);
    }
View Full Code Here

Examples of com.google.code.timetrail.backend.Event

   
    JButton btnNewButton = new JButton("Continue");
    btnNewButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        CardLayout cd = (CardLayout) myCD.getLayout();
        myControl.setNextEvent(new Event());
       
        myCD.add(new TakingMoveFrame(myControl, myCD, "Event"), "takeMove");
        cd.last(myCD);
       
      }
View Full Code Here

Examples of com.google.gwt.dev.util.log.speedtracer.SpeedTracerLogger.Event

  /**
   * Runs the module's user startup code.
   */
  public final void onLoad(TreeLogger logger) throws UnableToCompleteException {
    Event moduleSpaceLoadEvent = SpeedTracerLogger.start(DevModeEventType.MODULE_SPACE_LOAD);

    // Tell the host we're ready for business.
    //
    host.onModuleReady(this);

    // Make sure we can resolve JSNI references to static Java names.
    //
    try {
      createStaticDispatcher(logger);
      Object staticDispatch = getStaticDispatcher();
      invokeNativeVoid("__defineStatic", null, new Class[] {Object.class},
          new Object[] {staticDispatch});
    } catch (Throwable e) {
      logger.log(TreeLogger.ERROR, "Unable to initialize static dispatcher", e);
      throw new UnableToCompleteException();
    }

    // Actually run user code.
    //
    String entryPointTypeName = null;
    try {
      // Set up GWT-entry code
      Class<?> implClass = loadClassFromSourceName("com.google.gwt.core.client.impl.Impl");
      Method registerEntry = implClass.getDeclaredMethod("registerEntry");
      registerEntry.setAccessible(true);
      registerEntry.invoke(null);

      Method enter = implClass.getDeclaredMethod("enter");
      enter.setAccessible(true);
      enter.invoke(null);

      String[] entryPoints = host.getEntryPointTypeNames();
      if (entryPoints.length > 0) {
        try {
          for (int i = 0; i < entryPoints.length; i++) {
            entryPointTypeName = entryPoints[i];
            Method onModuleLoad = null;
            Object module;

            // Try to initialize EntryPoint, else throw up glass panel
            try {
              Class<?> clazz = loadClassFromSourceName(entryPointTypeName);
              try {
                onModuleLoad = clazz.getMethod("onModuleLoad");
                if (!Modifier.isStatic(onModuleLoad.getModifiers())) {
                  // it's non-static, so we need to rebind the class
                  onModuleLoad = null;
                }
              } catch (NoSuchMethodException e) {
                // okay, try rebinding it; maybe the rebind result will have one
              }
              module = null;
              if (onModuleLoad == null) {
                module = rebindAndCreate(entryPointTypeName);
                onModuleLoad = module.getClass().getMethod("onModuleLoad");
                // Record the rebound name of the class for stats (below).
                entryPointTypeName = module.getClass().getName().replace(
                    '$', '.');
              }
            } catch (Throwable e) {
              displayErrorGlassPanel(
                  "EntryPoint initialization exception", entryPointTypeName, e);
              throw e;
            }

            // Try to invoke onModuleLoad, else throw up glass panel
            try {
              onModuleLoad.setAccessible(true);
              invokeNativeVoid("fireOnModuleLoadStart", null,
                  new Class[]{String.class}, new Object[]{entryPointTypeName});

              Event onModuleLoadEvent = SpeedTracerLogger.start(
                  DevModeEventType.ON_MODULE_LOAD);
              try {
                onModuleLoad.invoke(module);
              } finally {
                onModuleLoadEvent.end();
              }
            } catch (Throwable e) {
              displayErrorGlassPanel(
                  "onModuleLoad() threw an exception", entryPointTypeName, e);
              throw e;
View Full Code Here

Examples of com.google.gwt.events.client.Event

    animation.hide();
  }

  public void onMouseDown(MouseDownEvent event) {
    Element elem = getElement();
    final Event e = event.getNativeEvent();

    offsetX = e.getClientX() - elem.getAbsoluteLeft();
    offsetY = e.getClientY() - elem.getAbsoluteTop();

    isDragging = true;
    // sink capture events
    MouseEventCapture.capture(new CaptureMouseListener());
    e.preventDefault();
  }
View Full Code Here

Examples of com.google.gwt.user.client.Event

        } else if (localName.equals("page")) {
            return SingletonIterator.makeIterator(context.getConfiguration().getHostPage());
        } else if (localName.equals("source")) {
            return SingletonIterator.makeIterator(context.getController().getSourceNode());
        } else if (localName.equals("event")) {
            Event event = (Event)context.getController().getUserData("Saxon-CE", "current-event");
            return SingletonIterator.makeIterator(new JSObjectValue(event));
        } else if (localName.equals("parse-xml")) {
          String data = argument[0].evaluateAsString(context).toString();
          return convertFromJavaScript(XMLDOM.parseXML(data), context.getConfiguration());
        }else {
View Full Code Here

Examples of com.google.wave.api.event.Event

    assertEquals("Expected operation id not to change", OPERATION_ID, response.getId());
  }

  public void testProcessEvent() throws Exception {
    // A randomly selected non-error event
    Event event = new WaveletBlipCreatedEvent(null, null, USERNAME, 0L, "root", "newBlip");

    operationContext.processEvent(request, event);

    JsonRpcResponse response = operationContext.getResponse(request.getId());
    assertFalse("Expected non-error response", response.isError());
View Full Code Here

Examples of com.impromptu.events.Event

    this.eventRepository = eventRepository;
  }
 
    @Override
    public Event addMessage(String eventId, String message) {
        Event event = eventRepository.findOne(eventId);
        List<String> messages = event.getMessages();
        messages.add(message);
        event.setMessages(messages);
        return eventRepository.save(event);
    }
View Full Code Here

Examples of com.jcloisterzone.event.Event

            }
        }
    }

    public void flushEventQueue() {
        Event event;
        while ((event = eventQueue.poll()) != null) {
            eventBus.post(event);
        }
    }
View Full Code Here

Examples of com.jgaap.util.Event

    EventSet known2;
   
   
   
    Vector<Event> test1 = new Vector<Event>();
    test1.add(new Event("mary", null));
    test1.add(new Event("had", null));
    test1.add(new Event("a", null));
    test1.add(new Event("little", null));
    test1.add(new Event("lamb", null));
    test1.add(new Event("whose", null));
    test1.add(new Event("fleece", null));
    test1.add(new Event("was", null));
    test1.add(new Event("white", null));
    test1.add(new Event("as", null));
    test1.add(new Event("snow", null));
    known1.addEvents(test1);
    //known1.setAuthor("Mary");
   
   
   
   
    //Same event set
    double Result = new CrossEntropyDivergence().divergence(new EventMap(known1), new EventMap(known1));
   
    //System.out.println(s);
   
   
    assertTrue(DistanceTestHelper.inRange(Result, 2.3978952, 0.0000001));
   
    //different event sets
   
    test1  = new Vector<Event>();
    Vector<Event> test2 = new Vector<Event>();
   
    test1.add(new Event("alpha", null));
    test1.add(new Event("beta", null));
    known1 = new EventSet();
    known1.addEvents(test1);
   
    test2.add(new Event("alpha", null));
    test2.add(new Event("alpha", null));
    test2.add(new Event("alpha", null));
    test2.add(new Event("beta", null));
    known2 = new EventSet();
    known2.addEvents(test2);
   
    Result = new CrossEntropyDivergence().divergence(new EventMap(known1), new EventMap(known2));
   
    //System.out.println(Result);
   
    assertTrue(DistanceTestHelper.inRange(Result, 0.836988, 0.000001));
   
    //Reversed Event Sets
   
    Result = new CrossEntropyDivergence().divergence(new EventMap(known2), new EventMap(known1));
   
    //System.out.println(Result);
   
    assertTrue(DistanceTestHelper.inRange(Result, 0.693147, 0.000001));
   
    //Test with Smoothing
    test2 = new Vector<Event>();
   
    test2.add(new Event("alpha", null));
    test2.add(new Event("alpha", null));
    test2.add(new Event("beta", null));
    test2.add(new Event("gamma", null));
    known2 = new EventSet();
    known2.addEvents(test2);
 
   
    //System.out.println("Start Here");
View Full Code Here

Examples of com.kurento.kmf.media.events.Event

      Object[] params = ParamAnnotationUtils.extractEventParams(
          constructor.getParameterAnnotations(), data);

      params[0] = object;

      Event e = (Event) constructor.newInstance(params);

      ((MediaEventListener) listener).onEvent(e);

    } catch (Exception e) {
      LOG.error("Exception while processing event '" + eventType
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.