/* * Process Method */ public override PanelNode Process(GroupNode g, PanelNode p) { if (g.Decorations[UnitDecision.DECISION_KEY] != null) { UnitDecision unitDecision = (UnitDecision)g.Decorations[UnitDecision.DECISION_KEY]; ConcreteInteractionObject cio = unitDecision.CIO; if (((ControlBasedCIO)cio).PrefersFullWidth() && !unitDecision.Handled) { p.AddRow(new FullWidthRow(p, cio)); unitDecision.Handled = true; } } return(p); }
/* * Process Method */ public override PanelNode Process(GroupNode g, PanelNode p) { if (g.Decorations[UnitDecision.DECISION_KEY] != null) { UnitDecision unitDecision = (UnitDecision)g.Decorations[UnitDecision.DECISION_KEY]; ConcreteInteractionObject cio = unitDecision.CIO; if (!unitDecision.Handled) { p.AddRow(new OneColumnRow(g, p, cio)); unitDecision.Handled = true; } } return(p); }
/* * Process Method */ public override ListNode Process(GroupNode group, ListNode list) { if (group.Decorations[UnitDecision.DECISION_KEY] != null) { // get the values that we need UnitDecision decision = (UnitDecision)group.Decorations[UnitDecision.DECISION_KEY]; CIOListItemNode item = new CIOListItemNode(decision.CIO); item.Decorations[GroupDecision.DECISION_KEY] = new GroupDecision(group); // determine whether this CIO should be on a panel bool onPanel = decision.CIO is ControlBasedCIO; item.Decorations[PanelDecision.DECISION_KEY] = new PanelDecision(decision, onPanel); if (onPanel) { LabelDictionary labels; if (decision.CIO is SmartCIO) { labels = ((SmartCIO)decision.CIO).Labels; } else { labels = ((ApplianceState)((StateLinkedCIO)decision.CIO).GetApplObj()).Labels; } if (labels != null) { PanelListNode pNode = new PanelListNode(labels); pNode.Add(item); list.Add(pNode); } } else { list.Add(item); } } return(list); }
/* * Process Method */ public override PanelNode Process(GroupNode g, PanelNode p) { if (g is BranchGroupNode) { BranchGroupNode bg = (BranchGroupNode)g; if (bg.Children.Count == 2 && !g.ContainsGroups()) { IEnumerator child = bg.Children.GetEnumerator(); while (child.MoveNext()) { if (((ObjectGroupNode)child.Current).Decorations[UnitDecision.DECISION_KEY] == null || ((UnitDecision)((ObjectGroupNode)child.Current).Decorations[UnitDecision.DECISION_KEY]).Handled || ((UnitDecision)((ObjectGroupNode)child.Current).Decorations[UnitDecision.DECISION_KEY]).CIO.HasLabel()) { return(p); } } LabelCIO labelCIO = null; if (g.Labels != null) { labelCIO = new LabelCIO(g.Labels); } UnitDecision d = (UnitDecision)((ObjectGroupNode)bg.Children[0]).Decorations[UnitDecision.DECISION_KEY]; ConcreteInteractionObject cio1 = d.CIO; d.Handled = true; d = (UnitDecision)((ObjectGroupNode)bg.Children[1]).Decorations[UnitDecision.DECISION_KEY]; ConcreteInteractionObject cio2 = d.CIO; d.Handled = true; LabeledTwoCompRow r = new LabeledTwoCompRow(g, p, labelCIO, cio1, cio2); p.AddRow(r); } } return(p); }