void CalculateAndSetRects(IRectCalculationData data) { data.CalculateRects(); SetUpGroupLength(data.groupLength); SetUpElementLength(data.elementLength); SetUpPadding(data.padding); }
/* Setting up rects */ /* * Note * * Three variable that affects the rects * ElementGroupRectLength * GroupElementLength * PaddingLength * two of these three must be somehow constrained to solve for each values * Fixed GroupLength * Fixed ElementLength * Fixed PaddingLength * Ratio of * GroupToElement * GropuToPadding * ElementToPadding * * Fixed is either of * constant value * proportional to reference */ public void SetUpRects(IRectCalculationData rectCalculationData) { thisRectCalculationData = rectCalculationData; thisRectCalculationData.SetColumnAndRowCount( thisNumOfColumns, thisNumOfRows ); CalculateAndSetRects(rectCalculationData); SetRectsDependentCalculators(); }
void CalculateAndSetRects(IRectCalculationData data) { data.CalculateRects(); thisUIAdaptor.SetRectSize(data.groupSize); foreach (IUIElement ele in thisGroupElements) { ele.SetRectSize(data.elementSize); } thisPadding = data.padding; }
public void SetUpElements() { IUIElement[] groupElements = GetGroupElements(); IRectCalculationData rectCalculationData = CreateRectCalculationData(groupElements); IUIElementGroup uieGroup = thisUIElementGroup; uieGroup.SetUpElements(groupElements); uieGroup.SetUpRects(rectCalculationData); uieGroup.PlaceElements(); }
protected override void SetUpUIElementReferenceImple() { base.SetUpUIElementReferenceImple(); List <IUIElement> groupElements = GetGroupElements(); IRectCalculationData rectCalculationData = CreateRectCalculationData(groupElements); IUIElementGroup uieGroup = (IUIElementGroup)this.GetUIElement(); uieGroup.SetUpElements(groupElements); uieGroup.SetUpRects(rectCalculationData); uieGroup.PlaceElements(); }