org.fest.swing.edt
Class GuiQuery<T>

java.lang.Object
  extended by 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 Object

Understands executing an action, in the event dispatch thread, that returns a value.

Author:
Alex Ruiz

Constructor Summary
GuiQuery()
           
 
Method Summary
protected abstract  T executeInEDT()
          Specifies the action to execute in the event dispatch thread.
 void run()
          Executes the query in the event dispatch thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GuiQuery

public GuiQuery()
Method Detail

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.


Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.