Class Scene

    • Constructor Detail

      • Scene

        public Scene​(IEngine engine)
        Instantiates a new scene.
        Parameters:
        engine - the engine to construct a scene for.
    • Method Detail

      • getEngine

        public IEngine getEngine()
        Specified by:
        getEngine in interface IScene
        Returns:
        the engine this scene belongs to.
      • setComponent

        public void setComponent​(IComponent<?> component)
        Description copied from interface: IScene
        Sets the root component of this scene.
        Specified by:
        setComponent in interface IScene
        Parameters:
        component - the component to set as the root.
      • getComponent

        public final IComponent<?> getComponent()
        Description copied from interface: IScene
        Returns the root component of this scene.
        Specified by:
        getComponent in interface IScene
        Returns:
        the root component of this scene.
      • setRenderer

        public void setRenderer​(IRenderer<?> renderer)
        Description copied from interface: IScene
        Sets this scene renderer.
        Specified by:
        setRenderer in interface IScene
        Parameters:
        renderer - the renderer to set.
      • refresh

        public void refresh()
        Description copied from interface: IScene
        Refreshes this scene presentation completely.
        Specified by:
        refresh in interface IScene
      • relayout

        public void relayout()
        Description copied from interface: IScene
        Triggers this scene's layout processing.
        Specified by:
        relayout in interface IScene
      • refresh

        public void refresh​(IComponent<?> component)
        Description copied from interface: IScene
        Refreshes this scene's subtree presentation starting at the given component.
        Specified by:
        refresh in interface IScene
        Parameters:
        component - the component to start from.
      • addSceneListener

        public void addSceneListener​(ISceneListener listener)
        Description copied from interface: IScene
        Adds this scene listener.
        Specified by:
        addSceneListener in interface IScene
        Parameters:
        listener - the listener to add.
      • removeSceneListener

        public void removeSceneListener​(ISceneListener listener)
        Description copied from interface: IScene
        Removes this scene listener.
        Specified by:
        removeSceneListener in interface IScene
        Parameters:
        listener - the listener to remove.
      • dispose

        public void dispose()
        Description copied from interface: IScene
        Disposes this scene.
        Specified by:
        dispose in interface IScene
      • registerSearchProvider

        public void registerSearchProvider​(IComponentSearchProvider searchProvider)
        Description copied from interface: IScene
        Registers a provider to be used by the scene for searching components.
        Specified by:
        registerSearchProvider in interface IScene
        Parameters:
        searchProvider - The search provider
      • handleComponentEvent

        public void handleComponentEvent​(IComponent<?> component,
                                         IEvent event)
        Description copied from interface: IScene
        Notifies the scene that a component-specific event has happened.
        Specified by:
        handleComponentEvent in interface IScene
        Parameters:
        component - The component from which originates the event
        event - The event that has happened with the component
      • putState

        public IState putState​(IComponent<?> component,
                               IState state)
        Description copied from interface: IScene
        Puts the specified state for the given component.
        Specified by:
        putState in interface IScene
        Parameters:
        component - the component, cannot be null.
        state - the state, can be null if there are no previous state for the specified component
        Returns:
        the previous stored state, can be null.
      • clearState

        public IState clearState​(IComponent<?> component)
        Description copied from interface: IScene
        Clears state for the given component.
        Specified by:
        clearState in interface IScene
        Parameters:
        component - the component, cannot be null.
        Returns:
        the previous stored state, can be null if there are no state for the specified component.
      • getState

        public IState getState​(IComponent<?> component)
        Description copied from interface: IScene
        Returns the current state for the given component.
        Specified by:
        getState in interface IScene
        Parameters:
        component - the component, cannot be null.
        Returns:
        the current state, can be null if there are no state for the specified component.