Package jadex.commons.gui.future
Class SwingResultListener<E>
- java.lang.Object
 - 
- jadex.commons.gui.future.SwingResultListener<E>
 
 
- 
- All Implemented Interfaces:
 IFunctionalExceptionListener,IFunctionalResultListener<E>,IFutureCommandResultListener<E>,IResultListener<E>,IUndoneResultListener<E>
public class SwingResultListener<E> extends java.lang.Object implements IUndoneResultListener<E>, IFutureCommandResultListener<E>
Listener that performs notifications on swing thread.. 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected IResultListener<E>listenerThe delegation listener.protected booleanundoneFlag if undone methods should be used. 
- 
Constructor Summary
Constructors Constructor Description SwingResultListener(IFunctionalResultListener<E> listener)Create a new listener with functional interfaces.SwingResultListener(IFunctionalResultListener<E> listener, IFunctionalExceptionListener exceptionListener)Create a new listener with functional interfaces.SwingResultListener(IResultListener<E> listener)Create a new listener. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcommandAvailable(java.lang.Object command)Called when a command is available.voidcustomCommandAvailable(java.lang.Object command)Called when a command is available.voidcustomExceptionOccurred(java.lang.Exception exception)Called when an exception occurred.voidcustomResultAvailable(E result)Called when the result is available.voidexceptionOccurred(java.lang.Exception exception)Called when an exception occurred.voidexceptionOccurredIfUndone(java.lang.Exception exception)Called when an exception occurred.booleanisUndone()Get the undone.voidresultAvailable(E result)Called when the result is available.voidresultAvailableIfUndone(E result)Called when the result is available. 
 - 
 
- 
- 
Field Detail
- 
listener
protected IResultListener<E> listener
The delegation listener. 
- 
undone
protected boolean undone
Flag if undone methods should be used. 
 - 
 
- 
Constructor Detail
- 
SwingResultListener
public SwingResultListener(IFunctionalResultListener<E> listener)
Create a new listener with functional interfaces.- Parameters:
 listener- The listener.exceptionListener- The listener that is called on exceptions.
 
- 
SwingResultListener
public SwingResultListener(IFunctionalResultListener<E> listener, IFunctionalExceptionListener exceptionListener)
Create a new listener with functional interfaces.- Parameters:
 listener- The listener.exceptionListener- The listener that is called on exceptions.
 
- 
SwingResultListener
public SwingResultListener(IResultListener<E> listener)
Create a new listener. 
 - 
 
- 
Method Detail
- 
resultAvailable
public final void resultAvailable(E result)
Called when the result is available.- Specified by:
 resultAvailablein interfaceIFunctionalResultListener<E>- Parameters:
 result- The result.
 
- 
exceptionOccurred
public final void exceptionOccurred(java.lang.Exception exception)
Called when an exception occurred.- Specified by:
 exceptionOccurredin interfaceIFunctionalExceptionListener- Parameters:
 exception- The exception.
 
- 
customResultAvailable
public void customResultAvailable(E result)
Called when the result is available.- Parameters:
 result- The result.
 
- 
customExceptionOccurred
public void customExceptionOccurred(java.lang.Exception exception)
Called when an exception occurred.- Parameters:
 exception- The exception.
 
- 
commandAvailable
public final void commandAvailable(java.lang.Object command)
Called when a command is available.- Specified by:
 commandAvailablein interfaceIFutureCommandResultListener<E>
 
- 
customCommandAvailable
public void customCommandAvailable(java.lang.Object command)
Called when a command is available. 
- 
resultAvailableIfUndone
public void resultAvailableIfUndone(E result)
Called when the result is available.- Specified by:
 resultAvailableIfUndonein interfaceIUndoneResultListener<E>- Parameters:
 result- The result.
 
- 
exceptionOccurredIfUndone
public void exceptionOccurredIfUndone(java.lang.Exception exception)
Called when an exception occurred.- Specified by:
 exceptionOccurredIfUndonein interfaceIUndoneResultListener<E>- Parameters:
 exception- The exception.
 
- 
isUndone
public boolean isUndone()
Get the undone.- Returns:
 - The undone.
 
 
 - 
 
 -