Exemple #1
0
		/// <summary>
		/// Creates a new Arrow instance and adds it to the flowchart.
		/// </summary>
		/// <param name="srcTable">Specifies the origin table.</param>
		/// <param name="srcRow">Specifies the origin row.</param>
		/// <param name="dstNode">Specifies the destination node.</param>
		/// <returns>A reference to the new arrow.</returns>
		public Arrow CreateArrow(Table srcTable, int srcRow, Node dstNode)
		{
			if (srcTable == null || dstNode == null) return null;

			if (!srcTable.canHaveArrows(true) && srcRow != -1) return null;

			if (srcRow < -1 || srcRow >= srcTable.RowCount) return null;

			// create the arrow object and store it in the item array
			Arrow newArrow = new Arrow(this);
			newArrow.setOrgAndDest(
				srcTable.createLink(newArrow, false, srcRow),
				dstNode.createLink(newArrow, dstNode.getCenter(), true));

			Add(newArrow, SelectAfterCreate);

			return newArrow;
		}
Exemple #2
0
		/// <summary>
		/// Creates a new Arrow instance and adds it to the flowchart.
		/// </summary>
		/// <param name="srcNode">Specifies the origin node.</param>
		/// <param name="destTable">Specifies the destination table.</param>
		/// <param name="destRow">Specifies the destination row.</param>
		/// <returns>A reference to the new arrow.</returns>
		public Arrow CreateArrow(Node srcNode, Table destTable, int destRow)
		{
			if (srcNode == null || destTable == null) return null;

			if (!destTable.canHaveArrows(false) && destRow != -1) return null;

			if (destRow < -1 || destRow >= destTable.RowCount)	return null;

			// create the arrow object and store it in the collection
			Arrow newArrow = new Arrow(this);
			newArrow.setOrgAndDest(
				srcNode.createLink(newArrow, srcNode.getCenter(), false),
				destTable.createLink(newArrow, true, destRow));

			Add(newArrow, SelectAfterCreate);

			return newArrow;
		}
Exemple #3
0
		/// <summary>
		/// Creates a new Arrow instance and adds it to the flowchart.
		/// </summary>
		/// <param name="srcBox">Specifies the origin box.</param>
		/// <param name="srcAnchor">Specifies the origin anchor point.</param>
		/// <param name="dstBox">Specifies the destination box.</param>
		/// <param name="dstAnchor">Specifies the destination anchor point.</param>
		/// <returns>A reference to the new arrow.</returns>
		public Arrow CreateArrow(Box srcBox, int srcAnchor, Box dstBox, int dstAnchor)
		{
			if (srcBox == null || dstBox == null) return null;

			// create the arrow object and store it in the collection
			Arrow newArrow = new Arrow(this);
			newArrow.setOrgAndDest(
				srcBox.createLink(newArrow, srcBox.getCenter(), false),
				dstBox.createLink(newArrow, dstBox.getCenter(), true));

			Add(newArrow, SelectAfterCreate);

			newArrow.OrgnAnchor = srcAnchor;
			newArrow.DestAnchor = dstAnchor;
			newArrow.updatePoints(newArrow.Points[newArrow.Points.Count-1]);

			return newArrow;
		}
Exemple #4
0
		/// <summary>
		/// Creates a new Arrow instance and adds it to the flowchart.
		/// </summary>
		/// <param name="src">Specifies the origin table.</param>
		/// <param name="srcRow">Specifies the origin row.</param>
		/// <param name="dest">Specifies the destination table.</param>
		/// <param name="destRow">Specifies the destination row.</param>
		/// <returns>A reference to the new arrow.</returns>
		public Arrow CreateArrow(Table src, int srcRow, Table dest, int destRow)
		{
			if (src == null || dest == null) return null;

			if (!src.canHaveArrows(true) && srcRow != -1) return null;
			if (!dest.canHaveArrows(false) && destRow != -1) return null;

			if (srcRow < -1 || srcRow >= src.RowCount) return null;
			if (destRow < -1 || destRow >= dest.RowCount) return null;

			// create the arrow object and store it in the item array
			Arrow newArrow = new Arrow(this);
			newArrow.setOrgAndDest(
				src.createLink(newArrow, false, srcRow),
				dest.createLink(newArrow, true, destRow));

			Add(newArrow, SelectAfterCreate);

			return newArrow;
		}
Exemple #5
0
		/// <summary>
		/// Creates a new Arrow instance and adds it to the flowchart.
		/// </summary>
		/// <param name="srcNode">Specifies the arrow origin.</param>
		/// <param name="dstNode">Specifies the arrow destination.</param>
		/// <returns>A reference to the new arrow.</returns>
		public Arrow CreateArrow(Node srcNode, Node dstNode)
		{
			if (srcNode == null || dstNode == null) return null;

			// create the arrow object and store it in the collection
			Arrow newArrow = new Arrow(this);
			newArrow.setOrgAndDest(
				srcNode.createLink(newArrow, srcNode.getCenter(), false),
				dstNode.createLink(newArrow, dstNode.getCenter(), true));

			Add(newArrow, SelectAfterCreate);

			return newArrow;
		}