Ejemplo n.º 1
0
        /// <summary>
        /// Initialize the collection of decorators associated with this shape type.  This method also
        /// creates shape fields for outer decorators, because these are not part of the shape fields collection
        /// associated with the shape, so they must be created here rather than in InitializeShapeFields.
        /// </summary>
        protected override void InitializeDecorators(global::System.Collections.Generic.IList <DslDiagrams::ShapeField> shapeFields, global::System.Collections.Generic.IList <DslDiagrams::Decorator> decorators)
        {
            base.InitializeDecorators(shapeFields, decorators);

            DslDiagrams::ShapeField field1     = DslDiagrams::ShapeElement.FindShapeField(shapeFields, "Name");
            DslDiagrams::Decorator  decorator1 = new DslDiagrams::ShapeDecorator(field1, DslDiagrams::ShapeDecoratorPosition.InnerTopLeft, DslDiagrams::PointD.Empty);

            decorators.Add(decorator1);

            DslDiagrams::ShapeField field2     = DslDiagrams::ShapeElement.FindShapeField(shapeFields, "ExpandCollapse");
            DslDiagrams::Decorator  decorator2 = new DslDiagrams::ExpandCollapseDecorator(this.Store, (DslDiagrams::ToggleButtonField)field2, DslDiagrams::ShapeDecoratorPosition.InnerTopRight, DslDiagrams::PointD.Empty);

            decorators.Add(decorator2);

            DslDiagrams::TextField field3 = new DslDiagrams::TextField("Type");

            field3.DefaultText      = global::JA.Risk.RiskDomainModel.SingletonResourceManager.GetString("ContainerShapeTypeDefaultText");
            field3.DefaultFocusable = true;
            field3.DefaultAutoSize  = true;
            field3.AnchoringBehavior.MinimumHeightInLines     = 1;
            field3.AnchoringBehavior.MinimumWidthInCharacters = 1;
            field3.DefaultAccessibleState = global::System.Windows.Forms.AccessibleStates.Invisible;
            DslDiagrams::Decorator decorator3 = new DslDiagrams::ShapeDecorator(field3, DslDiagrams::ShapeDecoratorPosition.OuterTopCenter, DslDiagrams::PointD.Empty);

            decorators.Add(decorator3);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initialize the collection of decorators associated with this shape type.  This method also
        /// creates shape fields for outer decorators, because these are not part of the shape fields collection
        /// associated with the shape, so they must be created here rather than in InitializeShapeFields.
        /// </summary>
        protected override void InitializeDecorators(global::System.Collections.Generic.IList <DslDiagrams::ShapeField> shapeFields, global::System.Collections.Generic.IList <DslDiagrams::Decorator> decorators)
        {
            base.InitializeDecorators(shapeFields, decorators);

            DslDiagrams::ShapeField field1     = DslDiagrams::ShapeElement.FindShapeField(shapeFields, "ExpandCollapse");
            DslDiagrams::Decorator  decorator1 = new DslDiagrams::ExpandCollapseDecorator(this.Store, (DslDiagrams::ToggleButtonField)field1, DslDiagrams::ShapeDecoratorPosition.InnerTopRight, DslDiagrams::PointD.Empty);

            decorators.Add(decorator1);

            DslDiagrams::ShapeField field2     = DslDiagrams::ShapeElement.FindShapeField(shapeFields, "BaseTypeName");
            DslDiagrams::Decorator  decorator2 = new DslDiagrams::ShapeDecorator(field2, DslDiagrams::ShapeDecoratorPosition.InnerTopLeft, new DslDiagrams::PointD(0.4, 0.125));

            decorators.Add(decorator2);

            DslDiagrams::ShapeField field3     = DslDiagrams::ShapeElement.FindShapeField(shapeFields, "IconDecorator");
            DslDiagrams::Decorator  decorator3 = new DslDiagrams::ShapeDecorator(field3, DslDiagrams::ShapeDecoratorPosition.InnerTopLeft, DslDiagrams::PointD.Empty);

            decorators.Add(decorator3);

            DslDiagrams::ShapeField field4     = DslDiagrams::ShapeElement.FindShapeField(shapeFields, "Name");
            DslDiagrams::Decorator  decorator4 = new DslDiagrams::ShapeDecorator(field4, DslDiagrams::ShapeDecoratorPosition.InnerTopLeft, new DslDiagrams::PointD(0.25, 0));

            decorators.Add(decorator4);

            DslDiagrams::ShapeField field5     = DslDiagrams::ShapeElement.FindShapeField(shapeFields, "BaseTypeIconDecorator");
            DslDiagrams::Decorator  decorator5 = new DslDiagrams::ShapeDecorator(field5, DslDiagrams::ShapeDecoratorPosition.InnerTopLeft, new DslDiagrams::PointD(0.25, 0.125));

            decorators.Add(decorator5);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initialize the collection of decorators associated with this shape type.  This method also
        /// creates shape fields for outer decorators, because these are not part of the shape fields collection
        /// associated with the shape, so they must be created here rather than in InitializeShapeFields.
        /// </summary>
        protected override void InitializeDecorators(global::System.Collections.Generic.IList <DslDiagrams::ShapeField> shapeFields, global::System.Collections.Generic.IList <DslDiagrams::Decorator> decorators)
        {
            base.InitializeDecorators(shapeFields, decorators);

            DslDiagrams::ShapeField field1     = DslDiagrams::ShapeElement.FindShapeField(shapeFields, "Name");
            DslDiagrams::Decorator  decorator1 = new DslDiagrams::ShapeDecorator(field1, DslDiagrams::ShapeDecoratorPosition.InnerTopCenter, DslDiagrams::PointD.Empty);

            decorators.Add(decorator1);

            DslDiagrams::ShapeField field2     = DslDiagrams::ShapeElement.FindShapeField(shapeFields, "ExpandCollapseDecorator");
            DslDiagrams::Decorator  decorator2 = new DslDiagrams::ExpandCollapseDecorator(this.Store, (DslDiagrams::ToggleButtonField)field2, DslDiagrams::ShapeDecoratorPosition.InnerTopRight, DslDiagrams::PointD.Empty);

            decorators.Add(decorator2);
        }
Ejemplo n.º 4
0
		/// <summary>
		/// Initialize the collection of decorators associated with this shape type.  This method also
		/// creates shape fields for outer decorators, because these are not part of the shape fields collection
		/// associated with the shape, so they must be created here rather than in InitializeShapeFields.
		/// </summary>
		protected override void InitializeDecorators(global::System.Collections.Generic.IList<DslDiagrams::ShapeField> shapeFields, global::System.Collections.Generic.IList<DslDiagrams::Decorator> decorators)
		{
			base.InitializeDecorators(shapeFields, decorators);
			
			DslDiagrams::ShapeField field1 = DslDiagrams::ShapeElement.FindShapeField(shapeFields, "Sterotype");
			DslDiagrams::Decorator decorator1 = new DslDiagrams::ShapeDecorator(field1, DslDiagrams::ShapeDecoratorPosition.InnerTopCenter, DslDiagrams::PointD.Empty);
			decorators.Add(decorator1);
				
			DslDiagrams::ShapeField field2 = DslDiagrams::ShapeElement.FindShapeField(shapeFields, "Name");
			DslDiagrams::Decorator decorator2 = new DslDiagrams::ShapeDecorator(field2, DslDiagrams::ShapeDecoratorPosition.InnerTopCenter, new DslDiagrams::PointD(0, 0.15));
			decorators.Add(decorator2);
				
			DslDiagrams::ShapeField field3 = DslDiagrams::ShapeElement.FindShapeField(shapeFields, "ExpandCollapse");
			DslDiagrams::Decorator decorator3 = new DslDiagrams::ExpandCollapseDecorator(this.Store, (DslDiagrams::ToggleButtonField)field3, DslDiagrams::ShapeDecoratorPosition.InnerTopRight, DslDiagrams::PointD.Empty);
			decorators.Add(decorator3);
				
		}