public void Add(FlexNodeBase node, int index = -1) { if (index == -1) { m_ChildList.Add(node); } else { m_ChildList.Insert(0, node); } }
public static int CompareFlexNodes(FlexNodeBase node1, FlexNodeBase node2) { var result = 0; if (node1.DataItem.Order < node2.DataItem.Order) { result = -1; } else if (node1.DataItem.Order > node2.DataItem.Order) { result = 1; } return(result); }
public FlexNodeBase Add(object ffObject, int index) { var flexNode = new FlexNodeBase(this, new FlexItem(ffObject)); if (index == -1) { m_ChildList.Add(flexNode); } else { m_ChildList.Insert(0, flexNode); } return(flexNode); }
public FlexNodeBase(FlexNodeBase parentNode, FlexItem ffObject) { m_ParentNode = parentNode; m_DataItem = ffObject; m_Level = (parentNode == null) ? 0 : parentNode.Level + 1; }
public void DeleteNode(FlexNodeBase node) { m_ChildList.Remove(node); }