Interface IView11
interface IView11
Extends IView10
This interface extends IView10 with the ability to attach caller-owned
ILayer instances that draw before or after this view’s children.
Like its predecessors, all methods of this interface must be called from the UI thread.
When this view is destroyed, any layer currently attached to either slot is
automatically detached. The caller retains the layer and may attach it to
another view or destroy it.
Methods
attachLayerBeforeChildren()
Sets anvoidattachLayerBeforeChildren(com.amazon.kepler.uitoolkit.graphics.ILayer*layer)
ILayer that draws before this view’s children.
Unlike the view’s children, the layer is not subject to this view’s
content-clipping region (set via IView2::setContentClipping).
The caller is responsible for the layer’s drawn extent.
Each call replaces any previously attached layer in this slot; the replaced
layer is detached. To detach without attaching a replacement, use
IView11::detachLayerBeforeChildren.
If the supplied layer is the same instance already occupying this slot,
the call is a no-op. If the supplied layer is currently attached to a
different parent (including this view’s after-children slot or another
view entirely), the call throws InvalidArgumentError. To move
a layer between slots, call the corresponding detachLayer*Children()
first to detach it, then attach it to the desired slot.
The caller is responsible for the layer’s lifetime.
Parameters
layer
com.amazon.kepler.uitoolkit.graphics.ILayer* — Required
The ILayer to attach.
Throws
InvalidArgumentError— if layer is null or is already attached to a parent (other than this slot on this view).
detachLayerBeforeChildren()
void detachLayerBeforeChildren()
Detaches the “before children” layer from the view which was attached using
IView11::attachLayerBeforeChildren. If no layer is attached, then this
method will have no effect.
attachLayerAfterChildren()
Sets anvoidattachLayerAfterChildren(com.amazon.kepler.uitoolkit.graphics.ILayer*layer)
ILayer that draws after this view’s children are drawn.
Unlike IView11::attachLayerBeforeChildren, the layer’s draw
operations are applied after the children’s draw operations.
Unlike the view’s children, the layer is not subject to this view’s
content-clipping region (set via IView2::setContentClipping).
The caller is responsible for the layer’s drawn extent.
Each call replaces any previously attached layer in this slot; the replaced
layer is detached. To detach without attaching a replacement, use
IView11::detachLayerAfterChildren.
If the supplied layer is the same instance already occupying this slot,
the call is a no-op. If the supplied layer is currently attached to a
different parent (including this view’s before-children slot or another
view entirely), the call throws InvalidArgumentError. To move
a layer between slots, call the corresponding detachLayer*Children()
first to detach it, then attach it to the desired slot.
The caller is responsible for the layer’s lifetime.
Parameters
layer
com.amazon.kepler.uitoolkit.graphics.ILayer* — Required
The ILayer to attach.
Throws
InvalidArgumentError— if layer is null or is already attached to a parent (other than this slot on this view).
detachLayerAfterChildren()
void detachLayerAfterChildren()
Detaches the “after children” layer from the view which was attached using
IView11::attachLayerAfterChildren. If no layer is attached, then this
method will have no effect.

