示例#1
0
 public PSM_AttributeContainerController(PSMAttributeContainer attributeContainer, DiagramController diagramController) :
     base(attributeContainer, diagramController)
 {
     controlsPSMAttributes = new ControlsPSMAttributes(AttributeContainer, DiagramController);
 }
示例#2
0
        public static void SwitchAssociationDiamond(AssociationViewHelper associationViewHelper, Association association, DiagramController controller)
        {
            SwitchAssociationDiamondCommand switchAssociationDiamondCommand =
                (SwitchAssociationDiamondCommand)SwitchAssociationDiamondCommandFactory.Factory().Create(controller);

            switchAssociationDiamondCommand.Association           = association;
            switchAssociationDiamondCommand.AssociationViewHelper = associationViewHelper;
            switchAssociationDiamondCommand.Execute();
        }
示例#3
0
 public PSM_ContentChoiceController(PSMContentChoice contentChoice, DiagramController diagramController) :
     base(contentChoice, diagramController)
 {
 }
示例#4
0
 /// <summary>
 /// Removes the element this controller controls
 /// </summary>
 public override void Remove()
 {
     DiagramController.RemovePSMSubtree(Element);
 }
示例#5
0
        public static JunctionPointCommand CreateBreakLineCommand(Point p, int orderInJunction, ObservablePointCollection pointCollection, DiagramController controller)
        {
            JunctionPointCommand junctionPointCommand =
                (JunctionPointCommand)JunctionPointCommandFactory.Factory().Create(controller);

            junctionPointCommand.Action     = JunctionPointCommand.EJunctionPointAction.AddPoint;
            junctionPointCommand.NewPoint   = p;
            junctionPointCommand.PointIndex = orderInJunction;
            junctionPointCommand.ViewHelperPointCollection = pointCollection;
            return(junctionPointCommand);
        }
示例#6
0
        public static JunctionPointCommand CreateSraightenLineCommand(int orderInJunction, ObservablePointCollection viewHelperPointCollection, DiagramController controller)
        {
            JunctionPointCommand junctionPointCommand = (JunctionPointCommand)JunctionPointCommandFactory.Factory().Create(controller);

            junctionPointCommand.Action     = JunctionPointCommand.EJunctionPointAction.RemovePoint;
            junctionPointCommand.PointIndex = orderInJunction;
            junctionPointCommand.ViewHelperPointCollection = viewHelperPointCollection;
            return(junctionPointCommand);
        }
示例#7
0
 public ControlsPSMAttributes(IHasPSMAttributes attributeHolder, DiagramController diagramController)
 {
     AttributeHolder   = attributeHolder;
     DiagramController = diagramController;
 }
示例#8
0
        /// <summary>
        /// Alters size of an element on the diagram
        /// </summary>
        /// <param name="width">new width</param>
        /// <param name="height">new height</param>
        /// <param name="viewHelper">viewHelper of the moved element</param>
        /// <param name="diagramController">diagram controller</param>
        public static void ResizeElement(double width, double height, PositionableElementViewHelper viewHelper, DiagramController diagramController)
        {
            ResizeElementCommand resizeElementCommand = CreateResizeCommand(width, height, viewHelper, diagramController);

            resizeElementCommand.Execute();
        }
 public PSM_ContentContainerController(PSMContentContainer contentContainer, DiagramController diagramController) :
     base(contentContainer, diagramController)
 {
 }
示例#10
0
 public CommentController(Comment comment, DiagramController diagramController) :
     base(comment, diagramController)
 {
 }
示例#11
0
 protected NamedElementController(NamedElement element, DiagramController diagramController)
     : base(element, diagramController)
 {
 }
 public PSM_DiagramReferenceController(PSMDiagramReference element, DiagramController diagramController) : base(element, diagramController)
 {
 }
示例#13
0
 public ClassController(PIMClass @class, DiagramController diagramController) :
     base(@class, diagramController)
 {
 }
示例#14
0
        /// <summary>
        /// Move an element on the diagram
        /// </summary>
        /// <param name="X">new X coordinate</param>
        /// <param name="Y">new Y coordinate</param>
        /// <param name="viewHelper">viewHelper of the moved element</param>
        /// <param name="diagramController">diagram controller</param>
        public static void MoveElement(double X, double Y, PositionableElementViewHelper viewHelper, DiagramController diagramController)
        {
            MoveElementCommand moveElementCommand = CreateMoveCommand(X, Y, viewHelper, diagramController);

            moveElementCommand.Execute();
        }
示例#15
0
 public PSM_ClassController(PSMClass @class, DiagramController diagramController) :
     base(@class, diagramController)
 {
     controlsPSMAttributes = new ControlsPSMAttributes(@class, diagramController);
 }
示例#16
0
        /// <summary>
        /// Creates <see cref="MoveElementCommand"/> that moves an element on the diagram
        /// </summary>
        /// <param name="X">new X coordinate</param>
        /// <param name="Y">new Y coordinate</param>
        /// <param name="viewHelper">viewHelper of the moved element</param>
        /// <param name="diagramController">diagram controller</param>
        /// <returns><see cref="MoveElementCommand"/> that moves an element on the diagram</returns>
        public static MoveElementCommand CreateMoveCommand(double?X, double?Y, PositionableElementViewHelper viewHelper, DiagramController diagramController)
        {
            MoveElementCommand moveElementCommand = (MoveElementCommand)MoveElementCommandFactory.Factory().Create(diagramController);

            moveElementCommand.X          = X;
            moveElementCommand.Y          = Y;
            moveElementCommand.ViewHelper = viewHelper;
            return(moveElementCommand);
        }
示例#17
0
 public GeneralizationController(Generalization generalization, DiagramController diagramController)
     : base(generalization, diagramController)
 {
 }
示例#18
0
        /// <summary>
        /// Creates <see cref="ResizeElementCommand"/> that resizes an element on the diagram
        /// </summary>
        /// <param name="width">new width</param>
        /// <param name="height">new height</param>
        /// <param name="viewHelper">viewHelper of the moved element</param>
        /// <param name="diagramController">diagram controller</param>
        /// <returns>Creates <see cref="ResizeElementCommand"/> that resizes an element on the diagram</returns>
        public static ResizeElementCommand CreateResizeCommand(double width, double height, PositionableElementViewHelper viewHelper, DiagramController diagramController)
        {
            ResizeElementCommand resizeElementCommand = (ResizeElementCommand)ResizeElementCommandFactory.Factory().Create(diagramController);

            resizeElementCommand.Width      = width;
            resizeElementCommand.Height     = height;
            resizeElementCommand.ViewHelper = viewHelper;
            return(resizeElementCommand);
        }
示例#19
0
 public ConnectionController(Element element, DiagramController diagramController)
     : base(element, diagramController)
 {
 }
示例#20
0
        public static void BreakLine(Point p, int orderInJunction, ObservablePointCollection pointCollection, DiagramController controller)
        {
            JunctionPointCommand pointCommand = CreateBreakLineCommand(p, orderInJunction, pointCollection, controller);

            pointCommand.Execute();
        }
示例#21
0
        public static void StraightenLine(int orderInJunction, ObservablePointCollection viewHelperPointCollection, DiagramController controller)
        {
            JunctionPointCommand junctionPointCommand = CreateSraightenLineCommand(orderInJunction, viewHelperPointCollection, controller);

            junctionPointCommand.Execute();
        }
示例#22
0
 protected ElementController(Element element, DiagramController diagramController)
 {
     DiagramController = diagramController;
     Element           = element;
 }
示例#23
0
        public static void ChangeSectionVisibility(ClassViewHelper classViewHelper, SectionVisibilityCommand.ESectionVisibilityAction action, DiagramController controller)
        {
            SectionVisibilityCommand command = (SectionVisibilityCommand)SectionVisibilityCommandFactory.Factory().Create(controller);

            command.Action     = action;
            command.ViewHelper = classViewHelper;
            command.Execute();
        }
示例#24
0
 public PSM_AssociationController(PSMAssociation element, DiagramController diagramController)
     : base(element, diagramController)
 {
 }
示例#25
0
        public static void ChangeElementNameLabelAlignment(ClassViewHelper classViewHelper, bool alignedRight, DiagramController controller)
        {
            ChangeElementNameLabelAlignmentCommand c = (ChangeElementNameLabelAlignmentCommand)ChangeElementNameLabelAlignmentCommandFactory.Factory().Create(controller);

            c.Set(classViewHelper, alignedRight);
            c.Execute();
        }
示例#26
0
 public AssociationController(Association association, DiagramController diagramController) :
     base(association, diagramController)
 {
 }
示例#27
0
 public PSM_ClassUnionController(PSMClassUnion classUnion, DiagramController diagramController) :
     base(classUnion, diagramController)
 {
 }