Package com._1c.g5.aef2.engines
Class Engine
- java.lang.Object
-
- com._1c.g5.aef2.engines.Engine
-
- All Implemented Interfaces:
IEngine,IRunnableQueue
public final class Engine extends Object implements IEngine
AEF engine implementation.- See Also:
IEngine
-
-
Field Summary
-
Fields inherited from interface com._1c.g5.aef2.engines.IRunnableQueue
IMMEDIATE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IScenecreateScene(IComponent<?> component, IRenderingParameters parameters)Creates the scene.voiddispose()Disposes the engine including all the scenes.voidflushRunnableQueue()Flushes the runnables queue forcing the all queued runnables to execute.org.eclipse.core.databinding.observable.RealmgetRealm()Returns the defaultRealmfor data binding support.booleanisDisposed()Returnstrueif the engine is disposed.voidqueueAndWaitRunnable(Runnable runnable)Queues the runnable for execution and waits for its completion.voidqueueRunnable(Runnable runnable)Queues the runnable for execution.<P extends IRenderingParameters>
voidregisterRenderer(Class<? extends IRenderer<P>> rendererClass, Class<P> parametersClass)Registers the renderer.voidresumeRunnableQueueProcessing()Resumes the runnables queue processing.voidsetDialogRenderer(Class<? extends IRenderer<?>> renderer)Sets the renderer used by this engine to display the dialogs.<M extends IModel>
ISceneshowDialog(IComponent<M> component, M model)Shows a dialog.voidsuspendRunnableQueueProcessing()Suspends the runnables queue processing, effectively this disables the event processing done by the engine for components.
-
-
-
Method Detail
-
getRealm
public org.eclipse.core.databinding.observable.Realm getRealm()
Description copied from interface:IEngineReturns the defaultRealmfor data binding support.
-
createScene
public IScene createScene(IComponent<?> component, IRenderingParameters parameters)
Description copied from interface:IEngineCreates the scene.- Specified by:
createScenein interfaceIEngine- Parameters:
component- the root scene component.parameters- the renderer parameters, actual renderer will be resolved by the parameters runtime class.- Returns:
- the scene created.
-
queueRunnable
public void queueRunnable(Runnable runnable)
Description copied from interface:IRunnableQueueQueues the runnable for execution.- Specified by:
queueRunnablein interfaceIRunnableQueue- Parameters:
runnable- the runnable to queue.- See Also:
IRunnableQueue.queueAndWaitRunnable(Runnable)
-
queueAndWaitRunnable
public void queueAndWaitRunnable(Runnable runnable)
Description copied from interface:IRunnableQueueQueues the runnable for execution and waits for its completion. The runnables queued during the passed runnable execution are also executed before this method returns. Typically, runnables created as a result of the user interaction with the UI should be executed synchronously using this method.- Specified by:
queueAndWaitRunnablein interfaceIRunnableQueue- Parameters:
runnable- the runnable to queue and wait for.- See Also:
IRunnableQueue.queueRunnable(Runnable)
-
suspendRunnableQueueProcessing
public void suspendRunnableQueueProcessing()
Description copied from interface:IEngineSuspends the runnables queue processing, effectively this disables the event processing done by the engine for components.- Specified by:
suspendRunnableQueueProcessingin interfaceIEngine
-
resumeRunnableQueueProcessing
public void resumeRunnableQueueProcessing()
Description copied from interface:IEngineResumes the runnables queue processing.- Specified by:
resumeRunnableQueueProcessingin interfaceIEngine
-
flushRunnableQueue
public void flushRunnableQueue()
Description copied from interface:IEngineFlushes the runnables queue forcing the all queued runnables to execute.- Specified by:
flushRunnableQueuein interfaceIEngine
-
registerRenderer
public <P extends IRenderingParameters> void registerRenderer(Class<? extends IRenderer<P>> rendererClass, Class<P> parametersClass)
Description copied from interface:IEngineRegisters the renderer.- Specified by:
registerRendererin interfaceIEngine- Parameters:
rendererClass- the renderer class to register.parametersClass- the renderer parameters class, parameters class is mapped to the renderer class in one-to-many way. In other words, the mapping from parameters to renderer should be unique.
-
setDialogRenderer
public void setDialogRenderer(Class<? extends IRenderer<?>> renderer)
Description copied from interface:IEngineSets the renderer used by this engine to display the dialogs.- Specified by:
setDialogRendererin interfaceIEngine- Parameters:
renderer- renderer to set.
-
showDialog
public <M extends IModel> IScene showDialog(IComponent<M> component, M model)
Description copied from interface:IEngineShows a dialog.- Specified by:
showDialogin interfaceIEngine- Parameters:
component- the root component of the dialog.model- the model of the root component.- Returns:
-
dispose
public void dispose()
Description copied from interface:IEngineDisposes the engine including all the scenes.
-
isDisposed
public boolean isDisposed()
Description copied from interface:IEngineReturnstrueif the engine is disposed.- Specified by:
isDisposedin interfaceIEngine- Returns:
trueif the engine is disposed.
-
-