Package jadex.commons.gui.future
Class SwingDefaultResultListener<E>
- java.lang.Object
- 
- jadex.commons.future.DefaultResultListener<E>
- 
- jadex.commons.gui.future.SwingDefaultResultListener<E>
 
 
- 
- All Implemented Interfaces:
- IFunctionalExceptionListener,- IFunctionalResultListener<E>,- IFutureCommandResultListener<E>,- IResultListener<E>
 - Direct Known Subclasses:
- SwingIntermediateDefaultResultListener
 
 public class SwingDefaultResultListener<E> extends DefaultResultListener<E> implements IFutureCommandResultListener<E> Result listener that redirects callbacks on the swing thread.
- 
- 
Field SummaryFields Modifier and Type Field Description protected IFunctionalExceptionListenercustomExceptionListenerCustom result listenerprotected IFunctionalResultListener<E>customResultListenerCustom result listenerprotected java.awt.ComponentparentThe component.
 - 
Constructor SummaryConstructors Constructor Description SwingDefaultResultListener()Create a new listener.SwingDefaultResultListener(IFunctionalResultListener<E> customResultListener)Create a new listener with functional interfaces.SwingDefaultResultListener(IFunctionalResultListener<E> customResultListener, IFunctionalExceptionListener customExceptionListener)Create a new listener with functional interfaces.SwingDefaultResultListener(IFunctionalResultListener<E> customResultListener, IFunctionalExceptionListener customExceptionListener, java.awt.Component parent)Create a new listener with functional interfaces.SwingDefaultResultListener(java.awt.Component parent)Create a new listener.SwingDefaultResultListener(java.util.logging.Logger logger)Create a new listener.
 - 
Method SummaryAll Methods Static 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.voidresultAvailable(E result)Called when the result is available.protected static voidunblock(Future<java.lang.Void> adblock)
 
- 
- 
- 
Field Detail- 
parentprotected java.awt.Component parent The component.
 - 
customResultListenerprotected IFunctionalResultListener<E> customResultListener Custom result listener
 - 
customExceptionListenerprotected IFunctionalExceptionListener customExceptionListener Custom result listener
 
- 
 - 
Constructor Detail- 
SwingDefaultResultListenerpublic SwingDefaultResultListener(IFunctionalResultListener<E> customResultListener) Create a new listener with functional interfaces.- Parameters:
- listener- The listener.
 
 - 
SwingDefaultResultListenerpublic SwingDefaultResultListener(IFunctionalResultListener<E> customResultListener, IFunctionalExceptionListener customExceptionListener) Create a new listener with functional interfaces.- Parameters:
- customResultListener- The custom result listener.
- customExceptionListener- The listener that is called on exceptions.
 
 - 
SwingDefaultResultListenerpublic SwingDefaultResultListener(IFunctionalResultListener<E> customResultListener, IFunctionalExceptionListener customExceptionListener, java.awt.Component parent) Create a new listener with functional interfaces.- Parameters:
- customResultListener- The custom result listener.
- customExceptionListener- The listener that is called on exceptions.
- parent- The parent component (when errors should be shown as dialog).
 
 - 
SwingDefaultResultListenerpublic SwingDefaultResultListener() Create a new listener.
 - 
SwingDefaultResultListenerpublic SwingDefaultResultListener(java.awt.Component parent) Create a new listener.- Parameters:
- parent- The parent component (when errors should be shown as dialog).
 
 - 
SwingDefaultResultListenerpublic SwingDefaultResultListener(java.util.logging.Logger logger) Create a new listener.- Parameters:
- logger- The logger.
 
 
- 
 - 
Method Detail- 
unblockprotected static void unblock(Future<java.lang.Void> adblock) 
 - 
resultAvailablepublic final void resultAvailable(E result) Called when the result is available.- Specified by:
- resultAvailablein interface- IFunctionalResultListener<E>
- Parameters:
- result- The result.
 
 - 
exceptionOccurredpublic final void exceptionOccurred(java.lang.Exception exception) Called when an exception occurred.- Specified by:
- exceptionOccurredin interface- IFunctionalExceptionListener
- Overrides:
- exceptionOccurredin class- DefaultResultListener<E>
- Parameters:
- exception- The exception.
 
 - 
customResultAvailablepublic void customResultAvailable(E result) Called when the result is available.- Parameters:
- result- The result.
 
 - 
customExceptionOccurredpublic void customExceptionOccurred(java.lang.Exception exception) Called when an exception occurred.- Parameters:
- exception- The exception.
 
 - 
commandAvailablepublic final void commandAvailable(java.lang.Object command) Called when a command is available.- Specified by:
- commandAvailablein interface- IFutureCommandResultListener<E>
- Overrides:
- commandAvailablein class- DefaultResultListener<E>
 
 - 
customCommandAvailablepublic void customCommandAvailable(java.lang.Object command) Called when a command is available.
 
- 
 
-