Package jadex.rules.tools.stateviewer
Class SwingSynchronizator
- java.lang.Object
- 
- jadex.rules.tools.stateviewer.SwingSynchronizator
 
- 
- All Implemented Interfaces:
- ISynchronizator
 
 public class SwingSynchronizator extends java.lang.Object implements ISynchronizator Synchronize code execution with the swing thread.
- 
- 
Constructor SummaryConstructors Constructor Description SwingSynchronizator()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinvokeLater(java.lang.Runnable action)Add an action from external thread.voidinvokeSynchronized(java.lang.Runnable code)Invoke some code synchronized with other behavior.booleanisExternalThread()Check if the external thread is accessing.
 
- 
- 
- 
Method Detail- 
invokeSynchronizedpublic void invokeSynchronized(java.lang.Runnable code) Invoke some code synchronized with other behavior.- Specified by:
- invokeSynchronizedin interface- ISynchronizator
- Parameters:
- code- The code to execute. The method will block the externally calling thread until the action has been executed. If the synchronizator does not accept external actions (because of termination) the method will directly fail with a runtime exception.
 
 - 
invokeLaterpublic void invokeLater(java.lang.Runnable action) Add an action from external thread. The contract of this method is as follows: The synchronizator ensures the execution of the external action, otherwise the method will throw a terminated exception.- Specified by:
- invokeLaterin interface- ISynchronizator
- Parameters:
- action- The action.
 
 - 
isExternalThreadpublic boolean isExternalThread() Check if the external thread is accessing.- Specified by:
- isExternalThreadin interface- ISynchronizator
- Returns:
- True, if called from an external (i.e. non-synchronized) thread.
 
 
- 
 
-