Ejemplo n.º 1
0
        internal bool setMainObject(ChartObject main)
        {
            if (main == null)
            {
                return(false);
            }

            if (main.getType() != ItemType.Arrow &&
                main.getType() != ItemType.Box &&
                main.getType() != ItemType.Table &&
                main.getType() != ItemType.ControlHost)
            {
                return(false);
            }

            if (!main.setGroup(this))
            {
                return(false);
            }

            mainObj = main;

            if (mainObj.getType() == ItemType.Arrow)
            {
                prevPoints = ((Arrow)mainObj).Points.Clone();
            }
            else
            {
                prevRect     = mainObj.getBoundingRect();
                prevRotation = (mainObj as Node).rotation();
            }

            return(true);
        }
Ejemplo n.º 2
0
        internal virtual void onDelete()
        {
            if (mainObj != null)
            {
                mainObj.setGroup(null);
            }
            mainObj = null;

            foreach (Attachment attc in attachments)
            {
                attc.node.putInGroup(null);
            }
            attachments.Clear();

            attachedObjects.Clear();
        }
Ejemplo n.º 3
0
		internal bool setMainObject(ChartObject main)
		{
			if (main == null) return false;

			if (main.getType() != ItemType.Arrow &&
				main.getType() != ItemType.Box &&
				main.getType() != ItemType.Table &&
				main.getType() != ItemType.ControlHost)
				return false;

			if (!main.setGroup(this)) return false;

			mainObj = main;

			if (mainObj.getType() == ItemType.Arrow)
			{
				prevPoints = ((Arrow)mainObj).Points.Clone();
			}
			else
			{
				prevRect = mainObj.getBoundingRect();
				prevRotation = (mainObj as Node).rotation();
			}

			return true;
		}