Package editor.util

Class BackgroundOperation


  • public class BackgroundOperation
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private BackgroundOperation()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void doBackgroundOp​(java.lang.Runnable run, boolean showWaitCursor)
      Runs a job in a background thread, using the ExecutorService, and optionally sets the cursor to the wait cursor and blocks input.
      void doBackgroundWaitOp​(java.lang.Runnable run)
      Sets the mouse cursor to the wait cursor, blocks input, and queues the runnable up in the ExecutorService.
      private java.util.concurrent.ExecutorService getJobRunner()
      Returns the instance of the job dispatcher, used for scheduling time-consuming operations (element state updates) on a separate thread.
      static BackgroundOperation instance()  
      (package private) void performBackgroundOp​(java.lang.Runnable run, java.awt.Component[] key, boolean showWaitCursor)  
      void waitOnBackgroundOp()
      Pumps through all current events in the background operation queue.
      void waitOnBackgroundOp​(long timeout)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • _jobRunner

        private java.util.concurrent.ExecutorService _jobRunner
    • Constructor Detail

      • BackgroundOperation

        private BackgroundOperation()
    • Method Detail

      • doBackgroundWaitOp

        public void doBackgroundWaitOp​(java.lang.Runnable run)
        Sets the mouse cursor to the wait cursor, blocks input, and queues the runnable up in the ExecutorService.
      • doBackgroundOp

        public void doBackgroundOp​(java.lang.Runnable run,
                                   boolean showWaitCursor)
        Runs a job in a background thread, using the ExecutorService, and optionally sets the cursor to the wait cursor and blocks input.
      • performBackgroundOp

        void performBackgroundOp​(java.lang.Runnable run,
                                 java.awt.Component[] key,
                                 boolean showWaitCursor)
      • getJobRunner

        private java.util.concurrent.ExecutorService getJobRunner()
        Returns the instance of the job dispatcher, used for scheduling time-consuming operations (element state updates) on a separate thread.
      • waitOnBackgroundOp

        public void waitOnBackgroundOp()
        Pumps through all current events in the background operation queue. Note that this is *NOT* a settle. Any operations added after this method is invoked will not be executed.
      • waitOnBackgroundOp

        public void waitOnBackgroundOp​(long timeout)