Package ej.mwt.render

## Class OverlapRenderPolicy

- java.lang.Object
- - ej.mwt.render.RenderPolicy
  - - ej.mwt.render.DefaultRenderPolicy
    - - ej.mwt.render.OverlapRenderPolicy

-     public class OverlapRenderPolicy
      extends DefaultRenderPolicy

  This render policy keeps the initial order of the widgets. That means that when a widget is rendered, the widgets after it in the hierarchy and that have an intersection with it, are also rendered.

  When a widget is asked to be rendered, all the widgets that overlap it in the desktop hierarchy are also rendered. A widget is considered to overlap another one if:

  - their bounds intersect,
  - it is after the other one when browsing the hierarchy following a depth-first algorithm.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class ej.mwt.render.RenderPolicy

      `RenderPolicy.RenderListener`

  - ### Field Summary

    - ### Fields inherited from class ej.mwt.render.RenderPolicy

      `DEBUG_RENDER_ENABLED_CONSTANT, DEBUG_RENDER_MONITOR_CONSTANT, MONITOR`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `OverlapRenderPolicy​(Desktop desktop)` | Creates an overlap render policy.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `renderWidget​(Widget widget, int x, int y, int width, int height)` | This method performs the increment render of the widget.

    - ### Methods inherited from class ej.mwt.render.DefaultRenderPolicy

      `renderDesktop, requestRender, setParentClip`

    - ### Methods inherited from class ej.mwt.render.RenderPolicy

      `getDesktop, renderWidget`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### OverlapRenderPolicy

          public OverlapRenderPolicy​(Desktop desktop)

      Creates an overlap render policy.
      Parameters:
        `desktop` - the desktop.

  - ### Method Detail

    - #### renderWidget

          protected void renderWidget​(Widget widget,
                                      int x,
                                      int y,
                                      int width,
                                      int height)

      Description copied from class: `DefaultRenderPolicy`
      This method performs the increment render of the widget. Its implementation only renders the widget and not its siblings, but this behavior may be changed by overriding this method.

      The given bounds are relative to the widget.

      Overrides:
        `renderWidget` in class `DefaultRenderPolicy`
      Parameters:
        `widget` - the widget to render.
        `x` - the x coordinate of the area to render.
        `y` - the y coordinate of the area to render.
        `width` - the width of the area to render.
        `height` - the height of the area to render.