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) -> ShapeNode
Parameters
x
The X-coordinate of the new node.
y
The Y-coordinate of the new node.
width
The width of the new node.
height
The 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
location
The coordinate of the new node.
size
The 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
x
The X-coordinate of the new node.
y
The Y-coordinate of the new node.
width
The width of the new node.
height
The height of the new node.
shape
The 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
location
The coordinate of the new node.
size
The size of the new node.
shape
The 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) -> TableNode
Parameters
x
The X-coordinate of the new node.
y
The Y-coordinate of the new node.
width
The width of the new node.
height
The 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
location
The coordinate of the new node.
size
The 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) -> TableNode
Parameters
x
The X-coordinate of the new node.
y
The Y-coordinate of the new node.
width
The width of the new node.
height
The height of the new node.
columns
The initial count of columns in the table.
rows
The 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
location
The coordinate of the new node.
size
The size of the new node.
shape
The TableNode of the new node.
columns
The initial count of columns in the table.
rows
The 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
rect
The bounding rectangle of the new node.
columns
The initial count of columns in the table.
rows
The 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) -> ContainerNode
Parameters
x
The X-coordinate of the new node.
y
The Y-coordinate of the new node.
width
The width of the new node.
height
The 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) -> ContainerNode
Parameters
location
The coordinate of the new node.
size
The 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) -> ContainerNode
Parameters
rect
The 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) -> ContainerNode
Parameters
x
The X-coordinate of the new node.
y
The Y-coordinate of the new node.
width
The width of the new node.
height
The height of the new node.
shape
Indicates 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) -> ContainerNode
Parameters
location
The coordinate of the new node.
size
The size of the new node.
foldable
Specifies 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) -> ContainerNode
Parameters
rect
The bounding rectangle of the new node.
foldable
Specifies 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) -> TreeViewNode
Parameters
x
The X-coordinate of the new node.
y
The Y-coordinate of the new node.
width
The width of the new node.
height
The 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) -> TreeViewNode
Parameters
location
The coordinate of the new node.
size
The 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) -> TreeViewNode
Parameters
rect
The 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) -> DiagramLink
Return 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) -> DiagramLink
Parameters
origin
The origin node.
originAnchor
The anchor of the origin node.
destination
The destination node.
destAnchor
The 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) -> DiagramLink
Parameters
origin
The origin table node.
destination
The 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) -> DiagramLink
Parameters
origin
The origin table node.
originRow
The index of the row in the origin table.
destination
The destination table node.
destRow
The 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) -> DiagramLink
Parameters
origin
The origin diagram node.
destination
The destination table node.
destRow
The 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) -> DiagramLink
Parameters
origin
The origin diagram node.
destination
The destination table node.
destRow
The 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) -> DiagramLink
Parameters
origin
The origin diagram node.
destination
The 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) -> DiagramLink
Parameters
origin
The origin point.
destination
The 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) -> DiagramLink
Return 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) -> DiagramLink
Parameters
origin
The origin tree-view node.
originItem
The origin item.
destination
The destination tree-view node.
destinationItem
The destination item.
Return Value
The newly created DiagramLink.