| Graphic Components > Using JViews TGO in SWT Applications > Multithreading Modes |
Multithreading Modes |
INDEX
PREVIOUS
NEXT
|
You can handle the SWT - Swing event threads of the user interface in two different modes:
SWTExceptions of type ERROR_THREAD_INVALID_ACCESS.
IlpNetwork, IlpEquipment, IlpTree, and IlpTable, only in the AWT/Swing event thread. Otherwise, you risk deadlocks.
Display.asyncExec() and the AWT method EventQueue.invokeLater().
IlvEventThreadUtil.setAWTThreadRedirect(Display) or IlvEventThreadUtil.enableAWTThreadRedirect() early during initialization.
IlpNetwork, IlpEquipment, IlpTree, and IlpTable in your application, your JComponents must use the method IlvSwingUtil.isDispatchThread() rather than EventQueue.isDispatchThread() or SwingUtilities.isEventDispatchThread().
// Switch single-event-thread mode during a static initialization. static { IlvEventThreadUtil.enableAWTThreadRedirect(); } |
| Note |
This mode is incompatible with AWT/Swing Dialogs. If you use single-thread mode, you cannot use AWT Dialogs, Swing JDialogs, or modal JInternalFrames in your application. There are also some other limitations. See the class IlvEventThreadUtil for a precise description of the limitations.
|
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. All rights reserved. Legal terms. | PREVIOUS NEXT |