Пример #1
0
        /// <summary>
        /// Arranges the shapes.
        /// </summary>
        public void ArrangeShapes()
        {
            List <ShapeElement> externalComponents = new List <ShapeElement>();
            List <ShapeElement> component          = new List <ShapeElement>();

            foreach (PresentationElement elem in this.NestedChildShapes)
            {
                ShapeElement shape = elem as ShapeElement;
                if (shape == null)
                {
                    continue;
                }

                if (shape.ModelElement is SoftwareComponent)
                {
                    component.Add(shape);
                }
                else
                {
                    externalComponents.Add(shape);
                }
            }
            PointD startPoint = new PointD(0.1, 0.1);

            if (component.Count > 0)
            {
                ShapeHelper.ArrangeChildShapes(this, component, 0, 1, startPoint, 0.2, 0);
                startPoint = new PointD(component[0].AbsoluteBoundingBox.Right + 0.4, component[0].AbsoluteBoundingBox.Location.Y);
            }

            ShapeHelper.ArrangeChildShapes(this, externalComponents, 0, 1, startPoint, 0, 0.4);
        }
Пример #2
0
        /// <summary>
        /// Arranges the shapes.
        /// </summary>
        public void ArrangeShapes()
        {
            double verticalStartPoint = 0.4;

            BinaryComponent component = ModelElement as BinaryComponent;

            if (component == null)
            {
                return;
            }
            Dictionary <ShapeElement, bool> shapes = new Dictionary <ShapeElement, bool>();

            foreach (ShapeElement shape in NestedChildShapes)
            {
                if (shape is NodeShape)
                {
                    shapes.Add(shape, false);
                }
            }

            ShapeHelper.ArrangeChildShapes(this, NestedChildShapes, AbsoluteBounds.Width, 0,
                                           new PointD(0.2, verticalStartPoint), 0.3, 0.5);
        }
Пример #3
0
 /// <summary>
 /// Arranges the shapes.
 /// </summary>
 public new void ArrangeShapes()
 {
     ShapeHelper.ArrangeChildShapes(this, this.NestedChildShapes, 12, 0, new PointD(0.2, 0.5), 0.2, 0.2);
 }
Пример #4
0
 /// <summary>
 /// Arranges the shapes.
 /// </summary>
 public void ArrangeShapes()
 {
     ShapeHelper.ArrangeChildShapes(this, NestedChildShapes, 0, 3, new PointD(0.2, 0.2), 0.1, 0.1);
 }