Dart Documentationdock_spawnDockNode

DockNode Class

Constructors

Code new DockNode(IDockContainer container) #

DockNode(this.container) {
  children = new List<DockNode>();
}

Methods

Code void addChild(DockNode childNode) #

void addChild(DockNode childNode) {
  childNode.detachFromParent();
  childNode.parent = this;
  children.add(childNode);
}

Code void addChildAfter(DockNode referenceNode, DockNode childNode) #

void addChildAfter(DockNode referenceNode, DockNode childNode) {
  _addChildWithDirection(referenceNode, childNode, false);
}

Code void addChildBefore(DockNode referenceNode, DockNode childNode) #

void addChildBefore(DockNode referenceNode, DockNode childNode) {
  _addChildWithDirection(referenceNode, childNode, true);
}

Code void detachFromParent() #

void detachFromParent() {
  if (parent != null) {
    parent.removeChild(this);
  }
  parent = null;
}

Code void performLayout() #

void performLayout() {
  var childContainers = new List<IDockContainer>();
  children.forEach((childNode) => childContainers.add(childNode.container));
  container.performLayout(childContainers);
}

Code void removeChild(DockNode childNode) #

void removeChild(DockNode childNode) {
  int index = children.indexOf(childNode);
  if (index >= 0) {
    children.removeRange(index, 1);
  }
}

Fields

Code List<DockNode> children #

List<DockNode> children;

Code IDockContainer container #

The dock container represented by this node

IDockContainer container;

Code DockNode parent #

DockNode parent;