Class RenderMonitor

  • All Implemented Interfaces:
    RenderPolicy.RenderListener

    public class RenderMonitor
    extends Object
    implements RenderPolicy.RenderListener
    Monitor for Widget rendering.

    It uses a Logger with following format:

     Render requested on Path > To > MyWidget at {0,1 2x3} of {10,20 30x40}
            by my.package.MyClass.myMethod(MyClass.java:0)
            at my.package.MyClass.myCaller(MyClass.java:1)
            at my.package.MyClass.myCaller(MyClass.java:2)
     
    • Constructor Detail

      • RenderMonitor

        public RenderMonitor()
    • Method Detail

      • onRenderRequested

        public void onRenderRequested​(Widget widget,
                                      int x,
                                      int y,
                                      int width,
                                      int height)
        Description copied from interface: RenderPolicy.RenderListener
        Handles a render request notification.

        Called by the RenderPolicy when a widget render is requested, in application thread.
        It is not called for each successive rendering relative to the RenderPolicy.
        It is not called for each successive rendering relative to the widget hierarchy.

        Specified by:
        onRenderRequested in interface RenderPolicy.RenderListener
        Parameters:
        widget - the widget requested to be rendered.
        x - the x coordinate of the area requested to be rendered.
        y - the y coordinate of the area requested to be rendered.
        width - the width of the area requested to be rendered.
        height - the height of the area requested to be rendered.
      • onRenderExecuted

        public void onRenderExecuted​(Widget widget,
                                     int x,
                                     int y,
                                     int width,
                                     int height)
        Description copied from interface: RenderPolicy.RenderListener
        Handles a render execution notification.

        Called by the RenderPolicy when a widget is rendered, in MicroUI thread.
        It is called for each successive rendering relative to the RenderPolicy.
        It is not called for each successive rendering relative to the widget hierarchy.

        Specified by:
        onRenderExecuted in interface RenderPolicy.RenderListener
        Parameters:
        widget - the rendered widget.
        x - the x coordinate of the rendered area.
        y - the y coordinate of the rendered area.
        width - the width of the rendered area.
        height - the height of the rendered area.