private void dockWithContainer(DockContainer dc, DockLayoutNode target, DockLocation locationRelativeToTarget) {
		boolean horizontal = locationRelativeToTarget.isHorizontal();
		int[] order = locationRelativeToTarget.getOrder();
		if (mChildren[order[0]] != null) {
			if (mChildren[order[1]] == null) {
				mChildren[order[1]] = mChildren[order[0]];
				mChildren[order[0]] = dc;
				mHorizontal = horizontal;
			} else {
				DockLayout layout = new DockLayout();
				layout.mParent = this;
				layout.mChildren[order[0]] = dc;
				layout.mHorizontal = horizontal;
				int which = target == mChildren[order[0]] ? 0 : 1;
				layout.mChildren[order[1]] = mChildren[order[which]];
				mChildren[order[which]] = layout;
				if (order[which] == 0) {
					layout.mDividerPosition = mDividerPosition;
					mDividerPosition = -1;
				} else {
					layout.mDividerPosition = -1;
				}
			}
		} else {
			mChildren[order[0]] = dc;
			mHorizontal = horizontal;
		}
	}