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 IScene
createScene(IComponent<?> component, IRenderingParameters parameters)
Creates the scene.void
dispose()
Disposes the engine including all the scenes.void
flushRunnableQueue()
Flushes the runnables queue forcing the all queued runnables to execute.org.eclipse.core.databinding.observable.Realm
getRealm()
Returns the defaultRealm
for data binding support.boolean
isDisposed()
Returnstrue
if the engine is disposed.void
queueAndWaitRunnable(Runnable runnable)
Queues the runnable for execution and waits for its completion.void
queueRunnable(Runnable runnable)
Queues the runnable for execution.<P extends IRenderingParameters>
voidregisterRenderer(Class<? extends IRenderer<P>> rendererClass, Class<P> parametersClass)
Registers the renderer.void
resumeRunnableQueueProcessing()
Resumes the runnables queue processing.void
setDialogRenderer(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.void
suspendRunnableQueueProcessing()
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:IEngine
Returns the defaultRealm
for data binding support.
-
createScene
public IScene createScene(IComponent<?> component, IRenderingParameters parameters)
Description copied from interface:IEngine
Creates the scene.- Specified by:
createScene
in 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:IRunnableQueue
Queues the runnable for execution.- Specified by:
queueRunnable
in interfaceIRunnableQueue
- Parameters:
runnable
- the runnable to queue.- See Also:
IRunnableQueue.queueAndWaitRunnable(Runnable)
-
queueAndWaitRunnable
public void queueAndWaitRunnable(Runnable runnable)
Description copied from interface:IRunnableQueue
Queues 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:
queueAndWaitRunnable
in interfaceIRunnableQueue
- Parameters:
runnable
- the runnable to queue and wait for.- See Also:
IRunnableQueue.queueRunnable(Runnable)
-
suspendRunnableQueueProcessing
public void suspendRunnableQueueProcessing()
Description copied from interface:IEngine
Suspends the runnables queue processing, effectively this disables the event processing done by the engine for components.- Specified by:
suspendRunnableQueueProcessing
in interfaceIEngine
-
resumeRunnableQueueProcessing
public void resumeRunnableQueueProcessing()
Description copied from interface:IEngine
Resumes the runnables queue processing.- Specified by:
resumeRunnableQueueProcessing
in interfaceIEngine
-
flushRunnableQueue
public void flushRunnableQueue()
Description copied from interface:IEngine
Flushes the runnables queue forcing the all queued runnables to execute.- Specified by:
flushRunnableQueue
in interfaceIEngine
-
registerRenderer
public <P extends IRenderingParameters> void registerRenderer(Class<? extends IRenderer<P>> rendererClass, Class<P> parametersClass)
Description copied from interface:IEngine
Registers the renderer.- Specified by:
registerRenderer
in 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:IEngine
Sets the renderer used by this engine to display the dialogs.- Specified by:
setDialogRenderer
in interfaceIEngine
- Parameters:
renderer
- renderer to set.
-
showDialog
public <M extends IModel> IScene showDialog(IComponent<M> component, M model)
Description copied from interface:IEngine
Shows a dialog.- Specified by:
showDialog
in 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:IEngine
Disposes the engine including all the scenes.
-
isDisposed
public boolean isDisposed()
Description copied from interface:IEngine
Returnstrue
if the engine is disposed.- Specified by:
isDisposed
in interfaceIEngine
- Returns:
true
if the engine is disposed.
-
-