Interface Renderable

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void onAttached()
      Called when this instance is scheduled for imminent rendering.
      void onDetached()
      Called when this instance is no longer scheduled for imminent rendering.
      void render​(ej.microui.display.GraphicsContext g)
      Renders this instance on the given graphics context.
      void showOnDisplay()
      Shows this instance on the display.
    • Method Detail

      • onAttached

        void onAttached()
        Called when this instance is scheduled for imminent rendering.

        For example, this method can load the resources necessary for rendering.

      • onDetached

        void onDetached()
        Called when this instance is no longer scheduled for imminent rendering.

        For example, this method can dispose the resources loaded in onAttached().

      • render

        void render​(ej.microui.display.GraphicsContext g)
        Renders this instance on the given graphics context.

        This method applies the translation and clip set in the given graphics context (it should not reset the translation and clip before drawing).

        Parameters:
        g - the graphics context to draw with.
      • showOnDisplay

        void showOnDisplay()
        Shows this instance on the display.

        Once the displayable is shown on the display, it can start animations and handle events. Once it is hidden (due to an other displayable being shown), it can stop the started animations and dispose the resources loaded in onAttached().