Class SwingExecSync

java.lang.Object
eu.bandm.tools.graficUtils.SwingExecSync

public abstract class SwingExecSync extends Object
Worker for transparently executing code which accesses swing resources. The payload code must be defined by overriding code(). A call to run() executes this code immediately iff the thread is already the swing event dispatch thread. Otherwise it is called indirectly/later by SwingUtilities.invokeAndWait(java.lang.Runnable). The payload code can place a calculation result in the buffer result.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Object
    Auxiliary field by which a result can be passed from the payload code to the caller.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    Must be overridden by the concrete payload code we want executed.
    run()
    Executes the code given as over-riding of code().

    Methods inherited from class java.lang.Object

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

    • result

      protected Object result
      Auxiliary field by which a result can be passed from the payload code to the caller.
  • Constructor Details

    • SwingExecSync

      public SwingExecSync()
  • Method Details