Interface IEngine

  • All Superinterfaces:
    IRunnableQueue
    All Known Implementing Classes:
    Engine

    public interface IEngine
    extends IRunnableQueue
    Defines the contract of AEF engine. The engine is the key object to all the AEF parts. Engine creates and manages a scene, the scene creates and manages a component tree, the component tree creates and manages a view model tree, renderer assigned by the engine renders the view model tree.
    See Also:
    IScene, IComponent, IViewModel, IRenderer
    • Method Detail

      • createScene

        IScene createScene​(IComponent<?> component,
                           IRenderingParameters parameters)
        Creates the scene.
        Parameters:
        component - the root scene component.
        parameters - the renderer parameters, actual renderer will be resolved by the parameters runtime class.
        Returns:
        the scene created.
      • registerRenderer

        <P extends IRenderingParameters> void registerRenderer​(Class<? extends IRenderer<P>> renderer,
                                                               Class<P> parameters)
        Registers the renderer.
        Parameters:
        renderer - the renderer class to register.
        parameters - 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

        void setDialogRenderer​(Class<? extends IRenderer<?>> renderer)
        Sets the renderer used by this engine to display the dialogs.
        Parameters:
        renderer - renderer to set.
      • showDialog

        <M extends IModelIScene showDialog​(IComponent<M> component,
                                             M model)
        Shows a dialog.
        Parameters:
        component - the root component of the dialog.
        model - the model of the root component.
        Returns:
      • suspendRunnableQueueProcessing

        void suspendRunnableQueueProcessing()
        Suspends the runnables queue processing, effectively this disables the event processing done by the engine for components.
      • resumeRunnableQueueProcessing

        void resumeRunnableQueueProcessing()
        Resumes the runnables queue processing.
      • flushRunnableQueue

        void flushRunnableQueue()
        Flushes the runnables queue forcing the all queued runnables to execute.
      • dispose

        void dispose()
        Disposes the engine including all the scenes.
      • isDisposed

        boolean isDisposed()
        Returns true if the engine is disposed.
        Returns:
        true if the engine is disposed.
      • getRealm

        org.eclipse.core.databinding.observable.Realm getRealm()
        Returns the default Realm for data binding support.
        Returns:
        Realm