Factory
open class Factory
Provides shortcut methods for creating and adding instances of the standard DiagramItem types.
-
Creates a new ShapeNode instance at the specified position with the specified size and adds it to the Nodes collection of the underlying diagram.
Declaration
Swift
open func createShapeNode(x: Double, y: Double, width: Double, height: Double) -> ShapeNodeParameters
xThe X-coordinate of the new node.
yThe Y-coordinate of the new node.
widthThe width of the new node.
heightThe height of the new node.
Return Value
The newly created ShapeNode instance.
-
Creates a new ShapeNode instance at the specified position with the specified size and adds it to the Nodes collection of the underlying diagram.
Parameters
locationThe coordinate of the new node.
sizeThe size of the new node.
Return Value
The newly created ShapeNode instance.
-
Creates a new ShapeNode instance at the specified position with the specified size and shape and adds it to the Nodes collection of the underlying diagram.
Declaration
Parameters
xThe X-coordinate of the new node.
yThe Y-coordinate of the new node.
widthThe width of the new node.
heightThe height of the new node.
shapeThe Shape of the new node.
Return Value
The newly created ShapeNode instance.
-
Creates a new ShapeNode instance at the specified position with the specified size AND SHAPE and adds it to the Nodes collection of the underlying diagram.
Parameters
locationThe coordinate of the new node.
sizeThe size of the new node.
shapeThe Shape of the new node.
Return Value
The newly created ShapeNode instance.
-
Creates a new ShapeNode instance within the specified bounding rectangle and shape and adds it to the Nodes collection of the underlying diagram.
Return Value
The newly created ShapeNode instance.
-
Creates a new TableNode instance at the specified position with the specified size and adds it to the Nodes collection of the underlying diagram.
Declaration
Swift
open func createTableNode(x: Double, y: Double, width: Double, height: Double) -> TableNodeParameters
xThe X-coordinate of the new node.
yThe Y-coordinate of the new node.
widthThe width of the new node.
heightThe height of the new node.
Return Value
The newly created TableNode instance.
-
Creates a new TableNode instance at the specified position with the specified size and adds it to the Nodes collection of the underlying diagram.
Parameters
locationThe coordinate of the new node.
sizeThe size of the new node.
Return Value
The newly created TableNode instance.
-
Creates a new TableNode instance at the specified position with the specified size and count of rows and columns and adds it to the Nodes collection of the underlying diagram.
Declaration
Swift
open func createTableNode( x:Double, y:Double, width:Double, height:Double, columns:Int, rows:Int) -> TableNodeParameters
xThe X-coordinate of the new node.
yThe Y-coordinate of the new node.
widthThe width of the new node.
heightThe height of the new node.
columnsThe initial count of columns in the table.
rowsThe initial count of rows in the table.
Return Value
The newly created TableNode instance.
-
Creates a new TableNode instance at the specified position with the specified size and shape and adds it to the Nodes collection of the underlying diagram.
Declaration
Parameters
locationThe coordinate of the new node.
sizeThe size of the new node.
shapeThe TableNode of the new node.
columnsThe initial count of columns in the table.
rowsThe initial count of rows in the table.
Return Value
The newly created TableNode instance.
-
Creates a new TableNode instance within the specified bounding rectangle and count of rows and columns and adds it to the Nodes collection of the underlying diagram.
Parameters
rectThe bounding rectangle of the new node.
columnsThe initial count of columns in the table.
rowsThe initial count of rows in the table.
Return Value
The newly created TableNode instance.
-
Creates a new ContainerNode instance at the specified position with the specified size and adds it to the Nodes collection of the underlying diagram.
Declaration
Swift
open func createContainerNode(x: Double, y: Double, width: Double, height: Double) -> ContainerNodeParameters
xThe X-coordinate of the new node.
yThe Y-coordinate of the new node.
widthThe width of the new node.
heightThe height of the new node.
Return Value
The newly created ContainerNode instance.
-
Creates a new ContainerNode instance at the specified position with the specified size and adds it to the Nodes collection of the underlying diagram.
Declaration
Swift
open func createContainerNode(location: Point, size: Size) -> ContainerNodeParameters
locationThe coordinate of the new node.
sizeThe size of the new node.
Return Value
The newly created ContainerNode instance.
-
Creates a new ContainerNode instance within the specified bounding rectangle and adds it to the Nodes collection of the underlying diagram.
Declaration
Swift
open func createContainerNode(bounds: Rect) -> ContainerNodeParameters
rectThe bounding rectangle of the new node.
Return Value
The newly created ContainerNode instance.
-
Creates a new ContainerNode instance at the specified position with the specified size and settings and adds it to the Nodes collection of the underlying diagram.
Declaration
Swift
open func createContainerNode( x:Double, y:Double, width:Double, height:Double, foldable:Bool) -> ContainerNodeParameters
xThe X-coordinate of the new node.
yThe Y-coordinate of the new node.
widthThe width of the new node.
heightThe height of the new node.
shapeIndicates whether the container node is foldable.
Return Value
The newly created ContainerNode instance.
-
Creates a new ShapeNode instance at the specified position with the specified size and settings and adds it to the Nodes collection of the underlying diagram.
Declaration
Swift
open func createContainerNode(location: Point, size: Size, foldable: Bool) -> ContainerNodeParameters
locationThe coordinate of the new node.
sizeThe size of the new node.
foldableSpecifies if the new container is foldable.
Return Value
The newly created ContainerNode instance.
-
Creates a new ContainerNode instance within the specified bounding rectangle and settings and adds it to the Nodes collection of the underlying diagram.
Declaration
Swift
open func createContainerNode(bounds: Rect, foldable: Bool) -> ContainerNodeParameters
rectThe bounding rectangle of the new node.
foldableSpecifies if the new container is foldable.
Return Value
The newly created ContainerNode instance.
-
Creates a new TreeViewNode instance at the specified position with the specified size and adds it to the Nodes collection of the underlying diagram.
Declaration
Swift
open func createTreeViewNode(x: Double, y: Double, width: Double, height: Double) -> TreeViewNodeParameters
xThe X-coordinate of the new node.
yThe Y-coordinate of the new node.
widthThe width of the new node.
heightThe height of the new node.
Return Value
The newly created TreeViewNode instance.
-
Creates a new TreeViewNode instance at the specified position with the specified size and adds it to the Nodes collection of the underlying diagram.
Declaration
Swift
open func createTreeViewNode(location: Point, size: Size) -> TreeViewNodeParameters
locationThe coordinate of the new node.
sizeThe size of the new node.
Return Value
The newly created TreeViewNode instance.
-
Creates a new TreeViewNode instance within the specified bounding rectangle and adds it to the Nodes collection of the underlying diagram.
Declaration
Swift
open func createTreeViewNode(bounds: Rect) -> TreeViewNodeParameters
rectThe bounding rectangle of the new node.
Return Value
The newly created TreeViewNode instance.
-
Creates a new DiagramLink instance and adds it to the Links collection of the underlying diagram.
Declaration
Swift
open func createDiagramLink(origin: DiagramNode, destination: DiagramNode) -> DiagramLinkReturn Value
The newly created DiagramLink.
-
Creates a new DiagramLink instance and adds it to the Links collection of the underlying diagram.
Declaration
Swift
open func createDiagramLink( origin: ShapeNode, originAnchor: Int, destination: ShapeNode, destAnchor: Int) -> DiagramLinkParameters
originThe origin node.
originAnchorThe anchor of the origin node.
destinationThe destination node.
destAnchorThe anchor of the destination node.
Return Value
The newly created DiagramLink.
-
Creates a new DiagramLink instance between two table nodes and adds it to the Links collection of the underlying diagram.
Declaration
Swift
open func createDiagramLink(origin: TableNode, destination: TableNode) -> DiagramLinkParameters
originThe origin table node.
destinationThe destination table node.
Return Value
The newly created DiagramLink.
-
Creates a new DiagramLink instance between two table nodes and adds it to the Links collection of the underlying diagram.
Declaration
Swift
open func createDiagramLink( origin :TableNode, originRow: Int, destination: TableNode, destRow: Int) -> DiagramLinkParameters
originThe origin table node.
originRowThe index of the row in the origin table.
destinationThe destination table node.
destRowThe index of the row in the destination table.
Return Value
The newly created DiagramLink.
-
Creates a new DiagramLink instance between a diagram node and table node and adds it to the Links collection of the underlying diagram.
Declaration
Swift
open func createDiagramLink(origin: DiagramNode, destination: TableNode, destRow: Int) -> DiagramLinkParameters
originThe origin diagram node.
destinationThe destination table node.
destRowThe index of the row in the destination table.
Return Value
The newly created DiagramLink.
-
Creates a new DiagramLink instance between a diagram node and table node and adds it to the Links collection of the underlying diagram.
Declaration
Swift
open func createDiagramLink(origin: TableNode, originRow: Int, destination: DiagramNode) -> DiagramLinkParameters
originThe origin diagram node.
destinationThe destination table node.
destRowThe index of the row in the destination table.
Return Value
The newly created DiagramLink.
-
Creates a new DiagramLink instance between a diagram node and a point and adds it to the Links collection of the underlying diagram.
Declaration
Swift
open func createDiagramLink(origin: DiagramNode, destination: Point) -> DiagramLinkParameters
originThe origin diagram node.
destinationThe destination point.
Return Value
The newly created DiagramLink.
-
Creates a new DiagramLink instance between a point and a diagram node and adds it to the Links collection of the underlying diagram.
Declaration
Swift
open func createDiagramLink(origin: Point, destination: DiagramNode) -> DiagramLinkParameters
originThe origin point.
destinationThe destination diagram node.
Return Value
The newly created DiagramLink.
-
Creates a new DiagramLink instance between two points and adds it to the Links collection of the underlying diagram.
Declaration
Swift
open func createDiagramLink(origin: Point, destination: Point) -> DiagramLinkReturn Value
The newly created DiagramLink.
-
Creates a new DiagramLink instance between two tree-view nodes and adds it to the links collection of the underlying diagram.
Declaration
Swift
open func createDiagramLink( origin: TreeViewNode, originItem: TreeViewItem, destination: TreeViewNode, destinationItem: TreeViewItem) -> DiagramLinkParameters
originThe origin tree-view node.
originItemThe origin item.
destinationThe destination tree-view node.
destinationItemThe destination item.
Return Value
The newly created DiagramLink.
Factory Class Reference