Examples of EventQueue


Examples of net.java.games.input.EventQueue

   */
  public void poll() {
    target.poll();

    Event event = new Event();
    EventQueue queue = target.getEventQueue();

    while (queue.getNextEvent(event)) {
      // handle button event
      if (buttons.contains(event.getComponent())) {
        Component button = event.getComponent();
        int buttonIndex = buttons.indexOf(button);
        buttonState[buttonIndex] = event.getValue() != 0;
View Full Code Here

Examples of net.java.games.input.EventQueue

   */
  public void poll() {
    target.poll();

    Event event = new Event();
    EventQueue queue = target.getEventQueue();

    while (queue.getNextEvent(event)) {
      // handle button event
      if (buttons.contains(event.getComponent())) {
        Component button = event.getComponent();
        int buttonIndex = buttons.indexOf(button);
        buttonState[buttonIndex] = event.getValue() != 0;
View Full Code Here

Examples of net.myexperiments.gos.schedule.EventQueue

     *
     * Setup System
     *
     */
//    layout = new CreateWorld(this);
    scheduler = new EventQueue(this);
    GOSPS = new PostOffice();
    /**
     *
     * Create console
     *
 
View Full Code Here

Examples of net.sf.robocode.host.events.EventQueue

    }
    newCommands.setMaxVelocity(Math.min(abs(newCommands.getMaxVelocity()), Rules.MAX_VELOCITY));
  }

  private List<Event> readoutEvents() {
    return events.getAndSet(new EventQueue());
  }
View Full Code Here

Examples of net.sourceforge.chaperon.parser.output.EventQueue

      {
        extractLevel--;

        try
        {
          EventQueue queue = parser.parse(parsertable, new ByteArrayInputStream(text.toString().getBytes()));

          SAXEventAdapter adapter = new SAXEventAdapter(handler, ignorabletokens, true);
          queue.fireEvents(adapter);
        }
        catch (ParserException pe)
        {
          pe.printStackTrace();
        }
View Full Code Here

Examples of org.apache.oozie.event.EventQueue

        SLAService slas = Services.get().get(SLAService.class);
        SLACalculatorMemory slaCalcMem = (SLACalculatorMemory) slas.getSLACalculator();
        slaCalcMem.init(Services.get().getConf()); // loads the job in sla map

        EventHandlerService ehs = Services.get().get(EventHandlerService.class);
        EventQueue ehs_q = ehs.getEventQueue();

        DummyZKOozie dummyOozie_1 = null;
        try {
            // start another dummy oozie instance (dummy sla and event handler services)
            dummyOozie_1 = new DummyZKOozie("a", "http://blah");
            DummySLACalculatorMemory dummySlaCalcMem = new DummySLACalculatorMemory();
            dummySlaCalcMem.init(Services.get().getConf());
            EventHandlerService dummyEhs = new EventHandlerService();
            dummySlaCalcMem.setEventHandlerService(dummyEhs);
            dummyEhs.init(Services.get());
            EventQueue dummyEhs_q = dummyEhs.getEventQueue();

            // Action started on Server 1
            updateCoordAction(id1, "RUNNING");
            slaCalcMem
                    .addJobStatus(id1, CoordinatorAction.Status.RUNNING.name(), EventStatus.STARTED, new Date(), null);
            SLACalcStatus s1 = (SLACalcStatus) ehs_q.poll();
            assertEquals(SLAStatus.IN_PROCESS, s1.getSLAStatus());

            // Action ended on Server 2
            updateCoordAction(id1, "FAILED");
            dummySlaCalcMem.addJobStatus(id1, CoordinatorAction.Status.FAILED.name(), EventStatus.FAILURE, new Date(
                    System.currentTimeMillis() - 1800 * 1000),
                    new Date());
            dummyEhs_q.poll(); // getting rid of the duration_miss event
            SLACalcStatus s2 = (SLACalcStatus) dummyEhs_q.poll();
            assertEquals(SLAStatus.MISS, s2.getSLAStatus());

            slaCalcMem.updateAllSlaStatus();
            dummySlaCalcMem.updateAllSlaStatus();
            assertEquals(0, ehs_q.size()); // no dupe event should be created again by Server 1
View Full Code Here

Examples of org.cishell.reference.remoting.event.EventQueue

        algFactoryReg = null;
        logHandler = null;
    }
   
    private void setupEventQueue() {
        q = new EventQueue(bContext, false);
       
        String filter = "(&(reply=*)" +
            "("+CIShellEventConstants.SESSION_ID+"="+sessionID+"))";

        Dictionary dict = new Hashtable();
View Full Code Here

Examples of org.cishell.reference.remoting.event.EventQueue

    private EventAdmin eventAdmin;
   
    public CIShellFrameworkServer(BundleContext bContext, CIShellContext ciContext) {
        this.bContext = bContext;
       
        q = new EventQueue(bContext);
       
        String host = "localhost";
       
        try {
            host = InetAddress.getLocalHost().getHostName();
View Full Code Here

Examples of org.zkoss.zk.ui.event.EventQueue

          // notification with title + message + selfClosing
          map.put("title", "Zksample2 Notification");
          map.put("message", "<br>Hello i'm a notification based on ZK-Gritter.<br><br>Many thanks to gekkio for writting the implementation.");
          map.put("autoClosing", false);
          EventQueue eq;
          eq = EventQueues.lookup("ApplicationEventQueue", EventQueues.APPLICATION, false);
          eq.publish(new Event("APPLICATION_NOTIFICATION", null, map));

          // notification with title + message + image
          map = new HashMap<String, Object>(0);
          map.put("title", "WOW !!!");
          map.put("message",
              "The notifications can hold a little image.<br><br> You can close me by clicking the 'x' in the left top corner shown when mouse is over.<br><br>Further you can stop/start the notifications with the checkbox <br>EN: 'stop notifications' <br>DE: 'Stoppe Benachrichtigungen'<br> on top right of the application.");
          map.put("autoClosing", true);
          map.put("image", "/images/sge.jpg");
          // EventQueues.lookup("ApplicationEventQueue",
          // EventQueues.APPLICATION, true).publish(new
          // Event("APPLICATION_NOTIFICATION", null, map));
          eq.publish(new Event("APPLICATION_NOTIFICATION", null, map));

        }
      });
      this.timer.setRunning(true);
    }
View Full Code Here

Examples of threadedevent.EventQueue

 
  private synchronized void bindDispatcher() {
    if (dispatcher != null)
      throw new RuntimeException("Listener already bound.");
   
    EventQueue queue = new EventQueue();
    dispatcher = new EventDispatcher(queue);
    setEventQueue(queue);
   
    // Starting the event dispatcher on a separate thread (it will be
    // shared thru multiple web clients).
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.