Examples of InvocationEvent


Examples of ae.java.awt.event.InvocationEvent

    /**
     * Should be called in response to a native mouse enter or native mouse
     * button released message. Should not be called during a mouse drag.
     */
    public void updateCursorLater(Component heavy) {
        nativeUpdater.postIfNotPending(heavy, new InvocationEvent
            (Toolkit.getDefaultToolkit(), nativeUpdater));
    }
View Full Code Here

Examples of ae.java.awt.event.InvocationEvent

        }

        class AWTInvocationLock {}
        Object lock = new AWTInvocationLock();

        InvocationEvent event =
                new InvocationEvent(requester,
                                    new Runnable() {
                                        public void run() {
                                            showInputMethodMenu();
                                        }
                                    },
                                    lock,
                                    true);

        AppContext requesterAppContext = SunToolkit.targetToAppContext(requester);
        synchronized (lock) {
            SunToolkit.postEvent(requesterAppContext, event);
            lock.wait();
        }

        Throwable eventThrowable = event.getThrowable();
        if (eventThrowable != null) {
            throw new InvocationTargetException(eventThrowable);
        }
    }
View Full Code Here

Examples of ae.java.awt.event.InvocationEvent

                }
            }
        };
        synchronized(notificationLock) {
            SunToolkit.postEvent(this,
                new InvocationEvent(Toolkit.getDefaultToolkit(), runnable));
            try {
                notificationLock.wait(DISPOSAL_TIMEOUT);
            } catch (InterruptedException e) { }
        }

        // Next, we post another InvocationEvent to the end of the
        // EventQueue.  When it's executed, we know we've executed all
        // events in the queue.

        runnable = new Runnable() { public void run() {
            synchronized(notificationLock) {
                notificationLock.notifyAll(); // Notify caller that we're done
            }
        } };
        synchronized(notificationLock) {
            SunToolkit.postEvent(this,
                new InvocationEvent(Toolkit.getDefaultToolkit(), runnable));
            try {
                notificationLock.wait(DISPOSAL_TIMEOUT);
            } catch (InterruptedException e) { }
        }
View Full Code Here

Examples of charva.awt.event.InvocationEvent

    /** Causes the runnable's run() method to be called in the
     * AWT dispatch thread.
     */
    public static void invokeLater(Runnable runnable_) {
  getInstance().postEvent(
    new InvocationEvent(Toolkit.getDefaultToolkit(), runnable_));
    }
View Full Code Here

Examples of eu.planets_project.ifr.core.storage.api.InvocationEvent

     * @throws  RepositoryException
     * @throws  URISyntaxException
     */
    public InvocationEvent retrieveInvocationEvent(String id) throws ItemNotFoundException, RepositoryException, URISyntaxException {
      log.fine("JCRManager.retrieveWorkflowExecution()");
      InvocationEvent _retVal = null;
      try {
        this.getSession();
        Node _execNode = session.getNodeByUUID(id);
          Property _propService = _execNode.getProperty("service");
          Property _propOperation = _execNode.getProperty("operation");
          Property _propInFile = _execNode.getProperty("inFile");
          Property _propOutFile = _execNode.getProperty("outFile");
          Property _propStart = _execNode.getProperty("start");
          Property _propEnd = _execNode.getProperty("end");
          _retVal = new InvocationEvent(id,
                          new URI(_propService.getString()),
                          _propOperation.getString(),
                          new URI(_propInFile.getString()),
                          new URI(_propOutFile.getString()),
                          _propStart.getDate().getTime(),
View Full Code Here

Examples of eu.planets_project.ifr.core.storage.api.InvocationEvent

 
    /**
     * @see eu.planets_project.ifr.core.storage.api.WorkflowManager#getInvocationEvent(java.lang.String)
     */
  public InvocationEvent getInvocationEvent(String id) throws ItemNotFoundException {
    InvocationEvent _retVal = null;
    try {
      _retVal = this.jcrManager.retrieveInvocationEvent(id);
    } catch (LoginException _exp) {
      throw new RuntimeException(_exp);
    } catch (RepositoryException _exp) {
View Full Code Here

Examples of java.awt.event.InvocationEvent

     * @see             #invokeAndWait
     * @since           1.2
     */
    public static void invokeLater(Runnable runnable) {
        Toolkit.getEventQueue().postEvent(
            new InvocationEvent(Toolkit.getDefaultToolkit(), runnable));
    }
View Full Code Here

Examples of java.awt.event.InvocationEvent

        }

  class AWTInvocationLock {}
        Object lock = new AWTInvocationLock();

        InvocationEvent event =
            new InvocationEvent(Toolkit.getDefaultToolkit(), runnable, lock,
        true);

        synchronized (lock) {
            Toolkit.getEventQueue().postEvent(event);
            lock.wait();
        }

        Throwable eventThrowable = event.getThrowable();
        if (eventThrowable != null) {
            throw new InvocationTargetException(eventThrowable);
        }
    }
View Full Code Here

Examples of java.awt.event.InvocationEvent

  // Indicates whether we timed out waiting for the invocation to run
  @RunsInEDT
  private boolean postInvocationEvent(@Nonnull EventQueue eventQueue, long timeout) {
    Object lock = new RobotIdleLock();
    synchronized (lock) {
      eventQueue.postEvent(new InvocationEvent(toolkit, EMPTY_RUNNABLE, lock, true));
      long start = currentTimeMillis();
      try {
        // NOTE: on fast linux systems when showing a dialog, if we don't provide a timeout, we're never notified, and
        // the test will wait forever (up through 1.5.0_05).
        lock.wait(timeout);
View Full Code Here

Examples of java.awt.event.InvocationEvent

        final JDesktopPane desktop = toolkit.getAwtContext().getDesktop();
        AppContext ac = SunToolkit.targetToAppContext(desktop);
        if (ac != null) {
            EventQueue eq = (EventQueue) ac.get(AppContext.EVENT_QUEUE_KEY);
            if (eq != null) {
                eq.postEvent(new InvocationEvent(Toolkit.getDefaultToolkit(), run));
                return;
            }
        }
        //shouldn't get here
        throw new RuntimeException("Desktop event queue not found!");
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.