Пример #1
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;
		}
Пример #2
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;
		}
Пример #3
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;
		}