Package com.smartgwt.client.docs

# Interface Containment

public interface Containment

### Component Containment and Hierarchy

Canvas hierarchy in the DOM is defined via `parent` and `child` relationships.

These may be set up explicitly via APIs such as `Canvas.addChild()`, or may be automatically set up by composite components. For example `TabSets` will nest their `panes` inside an appropriate sub component.
Developers using the `autoChildren` subsystem may also use the `autoParent` attribute to specify a target parent.

In addition to parent-child relationships, Smart GWT components support `master`-`peer` relationships. When a canvas is set to be the peer of some other canvas, the master and peer will share the same parent canvas (`reparenting` a master will automatically reparent any peers). Peers will move, resize and redraw with their masters and commonly use `snapTo positioning`

See Also:
  - `Canvas.addChild(com.smartgwt.client.widgets.Canvas)`
  - `Canvas.removePeer(com.smartgwt.client.widgets.Canvas)`
  - `Canvas.depeer()`
  - `Canvas.deparent()`
  - `Canvas.removeChild(com.smartgwt.client.widgets.Canvas)`
  - `Canvas.addPeer(com.smartgwt.client.widgets.Canvas)`
  - `Canvas.getParentCanvas()`
  - `Canvas.getMasterCanvas()`
  - `com.smartgwt.client.widgets.Canvas#getParentElements`
  - `Canvas.contains(com.smartgwt.client.widgets.Canvas)`
  - `Canvas.getParentElement()`
  - `Canvas.getParentCanvas()`
  - `Canvas.getTopElement()`
  - `Canvas.getMasterElement()`
  - `Canvas.getChildren()`
  - `Canvas.getPeers()`