Package org.zkoss.zk.ui

## Interface ShadowElement

- All Superinterfaces:
    `AfterCompose`
  All Known Implementing Classes:
    `Apply`, `Choose`, `ForEach`, `HtmlShadowElement`, `If`, `Otherwise`, `TemplateBasedShadowElement`, `When`

      public interface ShadowElement
      extends AfterCompose

  A shadow element can allow to have a set of shadow elements to work with a component tree and it can also support with ZK MVVM to dynamically change the content of a shadow element.
  Since:
    8.0.0
  Author:
    jumperchen

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `detach()` | Detach the relation points between the shadow host and this shadow element.
    `<T extends Component> java.util.List<T>` | `getDistributedChildren()` | Returns a list of distributed components of the shadow tree, including its descendant.
    `Component` | `getFirstInsertion()` | Returns the first component of its insertion range.
    `Component` | `getLastInsertion()` | Returns the last component of its insertion range.
    `Component` | `getNextInsertion()` | Returns the next insertion point, it may be a component, a shadow element, or null.
    `Component` | `getPreviousInsertion()` | Returns the previous insertion point, it may be a component, a shadow element, or null.
    `Component` | `getShadowHost()` | Returns the owner component that hosts this shadow element.
    `void` | `recreate()` | Detaches all child components and then recreate them.

    - ### Methods inherited from interface org.zkoss.zk.ui.ext.AfterCompose

      `afterCompose`

- - ### Method Detail

    - #### getShadowHost

          Component getShadowHost()

      Returns the owner component that hosts this shadow element.

    - #### getDistributedChildren

          <T extends Component> java.util.List<T> getDistributedChildren()

      Returns a list of distributed components of the shadow tree, including its descendant.

      It's better to manipulate with the component children from the host component.

      Returns:
        a list of distributed components (removeable only)

    - #### detach

          void detach()

      Detach the relation points between the shadow host and this shadow element.

    - #### recreate

          void recreate()

      Detaches all child components and then recreate them.

      It is used if you have assigned new values to dynamic properties and want to re-create child components to reflect the new values.

    - #### getFirstInsertion

          Component getFirstInsertion()

      Returns the first component of its insertion range.
      Since:
        10.0.0

    - #### getLastInsertion

          Component getLastInsertion()

      Returns the last component of its insertion range.
      Since:
        10.0.0

    - #### getNextInsertion

          Component getNextInsertion()

      Returns the next insertion point, it may be a component, a shadow element, or null.
      Since:
        10.0.0

    - #### getPreviousInsertion

          Component getPreviousInsertion()

      Returns the previous insertion point, it may be a component, a shadow element, or null.
      Since:
        10.0.0