LinkLabel
open class LinkLabel : InplaceEditable
Represents a label at a diagram link.
-
Initializes a new instance of the LinkLabel class associated with the specified DiagramLink.
Declaration
Swift
public init(link: DiagramLink?)
Parameters
link
The DiagramLink this label is associated to.
Return Value
The newly created LinkLabel object.
-
Initializes a new instance of the LinkLabel with the specified string and associated with the specified DiagramLink.
Declaration
Swift
public convenience init(link: DiagramLink?, text: String)
Parameters
link
The DiagramLink this label is associated to.
text
The text of the label.
Return Value
The newly created LinkLabel object.
-
Initializes a new instance of the LinkLabel class.
Declaration
Swift
public convenience init()
Return Value
The newly created LinkLabel object.
-
Creates an exact copy of this LinkLabel. All properties are copied to the newly created object.
Declaration
Swift
open func clone() -> LinkLabel
Return Value
The new LinkLabel.
-
Positions this label relatively to the specified link segment.
Declaration
Swift
open func setSegmentPosition(_ segment: Int, dx: Double, dy: Double)
Parameters
segment
The segment index.
dx
Horizontal offset from the segment center.
dy
Vertical offset from the segment center.
-
Positions this label relatively to the specified control point.
Declaration
Swift
open func setControlPointPosition(_ controlPoint: Int, dx: Double, dy: Double)
Parameters
controlPoint
The control point index.
dx
Horizontal offset from the point.
dy
Vertical offset from the point.
-
Positions this label relatively to the link length.
Declaration
Swift
open func setLinkLengthPosition(_ lengthFactor: Double)
Parameters
lengthFactor
A value between 0 and 1 specifying the position of the label relatively to the link’s length.
-
Loads this LinkLabel from the specified XML context and element.
Declaration
Swift
open func loadFromXml(_ element: XmlElement, context: XmlContext)
Parameters
element
The XmlElement, which contains this LinkLabel.
context
The XmlContext, which contains this LinkLabel.
-
Saves this LinkLabel into the specified XML context and element.
Declaration
Swift
open func saveToXml(_ element: XmlElement, context: XmlContext)
Parameters
element
The XmlElement, where the LinkLabel will be saved.
context
The XmlContext, where the LinkLabel will be saved.
-
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
-
Gets or sets the DiagramLink that displays this label.
Declaration
Swift
weak open var link: DiagramLink?
-
Gets or sets the text displayed inside this item.
Declaration
Swift
open var text: String
-
Gets or sets the color of text of this label.
Declaration
Swift
open var textColor: Color?
-
Gets or sets the name of the preferred font for this LinkLabel.
Declaration
Swift
open var fontName: String
-
Gets or sets the size of the font for this LinkLabel.
Declaration
Swift
open var fontSize: Double
-
Gets or sets whether the font is bold.
Declaration
Swift
open var fontBold: Bool
-
Gets or sets whether the font is italic.
Declaration
Swift
open var fontItalic: Bool
-
Gets or sets whether the font is underlined.
Declaration
Swift
open var fontUnderline: Bool
-
Gets or sets the MeasureUnit for this LinkLabel.
Declaration
Swift
open var fontUnit: MeasureUnit
-
Gets or sets a value indicating whether the label can be auto arranged.
Declaration
Swift
open var autoArrange: Bool { get set }
-
Specifies if auto arrange is used.
Declaration
Swift
open class var usingAutoArrange: Bool { get set }
-
Specifies that the label’s relative positioning is RelativeToLink.Segment.
Declaration
Swift
open class var segment: RelativeToLink { get }
-
Specifies that the label’s relative positioning is RelativeToLink.ControlPoint.
Declaration
Swift
open class var controlPoint: RelativeToLink { get }
-
Specifies that the label’s relative positioning is RelativeToLink.LinkLength.
Declaration
Swift
open class var linkLength: RelativeToLink { get }