public AssociationEndViewHelper(Diagram diagram, AssociationViewHelper associationViewHelper, AssociationEnd associationEnd)
            : base(diagram)
        {
            AssociationViewHelper       = associationViewHelper;
            MultiplicityLabelViewHelper = new AssociationLabelViewHelper(diagram);
            RoleLabelViewHelper         = new AssociationLabelViewHelper(diagram);
            AssociationEnd = associationEnd;

            points = new ObservablePointCollection();
        }
        public AssociationClassViewHelper(Diagram diagram) :
            base(diagram)
        {
            X = double.NaN;
            Y = double.NaN;

            AssociationViewHelper = new AssociationViewHelper(diagram);
            AssociationViewHelper.PropertyChanged += member_PropertyChanged;

            Points = new ObservablePointCollection();
        }
Beispiel #3
0
        public override void FillCopy(ViewHelper copy, IDictionary <Element, Element> modelMap)
        {
            AssociationViewHelper copyAssociationViewHelper = (AssociationViewHelper)copy;

            copyAssociationViewHelper.UseDiamond = UseDiamond;

            MainLabelViewHelper.FillCopy(copyAssociationViewHelper.MainLabelViewHelper, modelMap);

            for (int i = 0; i < AssociationEndsViewHelpers.Count; i++)
            {
                AssociationEndViewHelper associationEndViewHelper = AssociationEndsViewHelpers[i];
                AssociationEnd           copyEnd = ((Association)Map(associationEndViewHelper.AssociationEnd.Association, modelMap)).Ends[i];
                System.Diagnostics.Debug.Assert(copyEnd.Class == Map(associationEndViewHelper.AssociationEnd.Class, modelMap));
                AssociationEndViewHelper endViewHelperCopy = new AssociationEndViewHelper(copy.Diagram, copyAssociationViewHelper, copyEnd);
                associationEndViewHelper.FillCopy(endViewHelperCopy, modelMap);
                copyAssociationViewHelper.AssociationEndsViewHelpers.Add(endViewHelperCopy);
            }

            base.FillCopy(copy, modelMap);
        }