DiagramLink
open class DiagramLink : DiagramItem, InplaceEditable
Represents a link between two diagram nodes. This class inherits DiagramItem.
-
Initializes a new instance of the DiagramLink class.
Declaration
Swift
public override init()
Return Value
The newly created DiagramLink instance.
-
Undocumented
Declaration
Swift
open func getTextToEdit() -> String
-
Undocumented
Declaration
Swift
open func setEditedText(_ text: String)
-
Undocumented
Declaration
Swift
open func getEditRect(_ item: DiagramItem?, pointerPosition: Point) -> Rect
-
Undocumented
Declaration
Swift
open func raiseItemTextEditing(_ oldText: String, newText: String)
-
Undocumented
Declaration
Swift
open func raiseItemTextEdited(_ oldText: String, newText: String)
-
Undocumented
Declaration
Swift
open func getEditedItem() -> DiagramItem
-
Aligns all Point-s of this DiagramLink.
Declaration
Swift
open func alignPoints()
-
Gets or sets the ConnectionPoint object representing the link connection to its origin node. This allows connecting the link to a constituent part of a node, such as a TreeViewItem.
Declaration
Swift
open lazy var originConnection: ConnectionPoint { get set }
-
Gets or sets the ConnectionPoint object representing the link connection to its destination node. This allows connecting the link to a constituent part of a node, such as a TreeViewItem.
Declaration
Swift
open lazy var destinationConnection: ConnectionPoint { get set }
-
Gets or sets the DiagramNode that is the origin of this DiagramLink.
Declaration
Swift
open var origin: DiagramNode { get set }
-
Gets or sets the DiagramNode that is the destination of this DiagramLink.
Declaration
Swift
open var destination: DiagramNode { get set }
-
Gets or sets the index of the origin anchor point within the AnchorPattern that contains it.
Declaration
Swift
open var originAnchor: Int { get set }
-
Gets or sets the index of the destination anchor point within the AnchorPattern that contains it.
Declaration
Swift
open var destinationAnchor: Int { get set }
-
Gets or sets the position of the first control point of this link.
Declaration
Swift
open var startPoint: Point { get set }
-
Gets or sets the position of the last control point of this link.
Declaration
Swift
open var endPoint: Point { get set }
-
Overrides DiagramItem.HitTestHandle.
Declaration
Swift
open override func hitTestHandle(_ point: Point) -> AdjustmentHandle?
-
Overrides DiagramItem.containsPoint.
Declaration
Swift
open override func containsPoint(_ point: Point) -> Bool
-
Overrides DiagramItem.containsPoint.
Declaration
Swift
open override func containsPoint(_ point: Point, threshold: Double) -> Bool
-
Returns a string with the class Id for this class.
Declaration
Swift
open override func getClassId() -> String
Return Value
The class id.
-
Draws the link in the specified canvas.
Declaration
Swift
open override func draw(_ canvas: Canvas, options: RenderOptions)
Parameters
canvas
The canvas at which the link is drawn.
options
The RenderOptions considered when the link is drawn.
-
Overrides DiagramItem.DrawHandles.
Declaration
Swift
open override func drawHandles(_ canvas: Canvas)
-
Create state storage for the diagram item.
Declaration
Swift
open override func createState() -> DiagramItemState
-
Saves the state of the diagram item.
Declaration
Swift
open override func saveState() -> DiagramItemState
-
Restores the state of the diagram item.
Declaration
Swift
open override func restoreState(_ state: DiagramItemState)
-
Overrides DiagramItem.loadFromXml.
Declaration
Swift
open override func loadFromXml(_ element: XmlElement, context: XmlContext)
-
Overrides DiagramItem.saveToXml.
Declaration
Swift
open override func saveToXml(_ element: XmlElement, context: XmlContext)
-
Draws an arrowhead shape.
Declaration
Parameters
canvas
The canvas to draw the shape on.
shape
A Shape instance that defines the arrowhead geometry.
pivot
position
A point on the drawing surface where the arrowhead tip should be located.
segmentStart
A point specifying the arrowhead direction.
size
A double value that specifies the arrowhead size.
-
Overrides DiagramItem.getBounds().
Declaration
Swift
open override func getBounds() -> Rect
-
Looks for a
Style
that defines an appearance property’s value in specifiedTheme
. OverridesDiagramItem.resolveInheritedStyle(...)
.Declaration
Swift
open override func resolveInheritedStyle(_ check: StyleCheck, theme: Theme?) -> Style?
Parameters
check
A
StyleCheck
predicate that verifies if property is set.Return Value
The
Style
if resolved, or nil otherwise. -
Updates the link’s internal state after the link’s control points have been changed.
Declaration
Swift
open func updateFromPoints()
-
Gets or sets the width of the arrowhead stroke outline.
Declaration
Swift
open var headStrokeThickness: Double { get set }
-
Gets or sets the size of the arrowhead shape.
Declaration
Swift
open var headShapeSize: Double { get set }
-
Gets or sets the size of the shape at the beginning of the link.
Declaration
Swift
open var baseShapeSize: Double { get set }
-
Gets or sets the size of the shape displayed at the middle of each segment of the link.
Declaration
Swift
open var intermediateShapeSize: Double { get set }
-
Gets or sets whether cascading links start in horizontal direction.
Declaration
Swift
open var cascadeStartHorizontal: Bool
-
Gets or sets whether link crossings are drawn.
Declaration
Swift
open var drawCrossings: Bool { get set }
-
Gets or sets the radius of the link crossing.
Declaration
Swift
open var crossingRadius: Double { get set }
-
Returns the list of all labels displayed by this link.
Declaration
Swift
open var labels: [LinkLabel]
-
Gets or sets the number of segments of this link.
Declaration
Swift
open var segmentCount: Int { get set }
-
Overrides DiagramItem.isTopLavel.
Declaration
Swift
open override func isTopLevel() -> Bool
-
Turns on or off auto routing for this DiagramLink.
Declaration
Swift
open var autoRoute: Bool