Interface SWTContext
-
- All Superinterfaces:
AutoCloseable
,Closeable
,GUIContext
- All Known Subinterfaces:
SWTBrowserContext
public interface SWTContext extends GUIContext
This interface defines a graphical context that could be used by application components to integrate them into a SWT-GUI on a workflow-client. The graphical context is created by aGUIManager
and provided to the application component viaSessionContext.getGUIContext()
. The application component has to cast the returnedGUIContext
to this graphical context.Some SWT inherent methods must be executed by the corresponding display thread. The implementation of this interface has to ensure that the display thread is available for an application component. I. e. the compontent using a gui context of that type may pass any commands to execute within the display thread by the following code fragment:
getParentComposite().getDisplay().syncExec(new Runnable(){
public void run()
{
//commands to execute
}
});
Note: This context does not ensure that the SWT-environment is integrated in an eclipse environment. So, in general, the application components must not make use of any features provided by eclipse. To ensure that there is a running eclipse instance in background components should claim the
de.aristaflow.adept2.ui.swtgui.EclipseAwareSWTContext
.- Author:
- Markus Lauer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.eclipse.swt.widgets.Composite
getParentComposite()
Gets the parent composite of this context to use for the GUI of the application.-
Methods inherited from interface de.aristaflow.adept2.model.runtimeenvironment.GUIContext
close
-
-
-
-
Method Detail
-
getParentComposite
org.eclipse.swt.widgets.Composite getParentComposite()
Gets the parent composite of this context to use for the GUI of the application.
AnInvalidExecutorThreadException
will be thrown if the method is not called by the main thread of the corresponding component.- Returns:
- Returns the parent composite which should be used by the Component to draw its GUI.
-
-