Class GuiQuery<T>

java.lang.Object
org.fest.swing.edt.GuiAction
org.fest.swing.edt.GuiQuery<T>
Type Parameters:
T - the return type of the action to execute.
All Implemented Interfaces:
Runnable

public abstract class GuiQuery<T> extends GuiAction
Understands executing an action, in the event dispatch thread, that returns a value.
  • Field Details

    • result

      private T result
  • Constructor Details

    • GuiQuery

      public GuiQuery()
  • Method Details

    • run

      public final void run()
      Executes the query in the event dispatch thread. This method waits until the action has finish its execution.
      Throws:
      ActionFailedException - if this task is not executed in the event dispatch thread.
    • executeInEDT

      protected abstract T executeInEDT() throws Throwable
      Specifies the action to execute in the event dispatch thread.
      Returns:
      the result of the execution of the action.
      Throws:
      Throwable - any error thrown when executing an action in the event dispatch thread.
    • result

      final T result()
    • clearResult

      final void clearResult()