new LinkOptions()
Every option of the LinkOptions type has associated a property of the link. For instance, the option:
caption, defines the link's captionis associated with the property:
Caption {string}, defines the link's captionwhich means that the following statements are equivalent:
oLink.Options = {caption: "name"}where oLink is an object of Link type
oLink.SetOptions({caption: "name"})
oLink.Caption = "name"
oLink.SetCaption("name")
Members
(static) allowControlPoint :object
The Swimlane.LinkControlPointEnum type defines the following flags:
- exNoControlPoint(0), the link displays no control points
- exStartControlPoint(1), the link shows control point that changes the link's startPos field (the exStartControlPoint point is marked with black squares)
- exEndControlPoint(2), the link shows control point that changes the link's endPos field (the exEndControlPoint point is marked with black squares)
- exControlPoint(4), defines the corners of the link's path. You can remove a exControlPoint points by dragging to another, so intermediate exControlPoint points are removed. You can move all control points of the link at once, if SHIFT key is pressed (the exControlPoint points are marked black circles)
- exMiddleControlPoint(8), defines the link's middle control points that are displayed between two exControlPoint points, to let the use add new exControlPoint points, to redefine the link's path (The exMiddleControlPoint points are marked with gray circles)
- exOrthoArrange(0x10), specifies that the lines of the link are orthogonal arranged when the user drags and drops the middle or control-points of the path (excludes the start/end control-points)
- exAllowChangeFrom(0x20), allows the user to adjust the link's from element by dragging and dropping the start control point (requires the exStartControlPoint flag)
- exAllowChangeTo(0x40), indicates that the user can adjust the link's to element by dragging and dropping the end control point (requires the exEndControlPoint flag)
The allowControlPoint field is mapped to the Link.AllowControlPoint property, which means that the following statements are equivalent:
oLink.Options = {allowControlPoint: exontrol.Swimlane.LinkControlPointEnum.exStartControlPoint | exontrol.Swimlane.LinkControlPointEnum.exEndControlPoint}
oLink.SetOptions({allowControlPoint: exontrol.Swimlane.LinkControlPointEnum.exStartControlPoint | exontrol.Swimlane.LinkControlPointEnum.exEndControlPoint})
oLink.AllowControlPoint = exontrol.Swimlane.LinkControlPointEnum.exStartControlPoint | exontrol.Swimlane.LinkControlPointEnum.exEndControlPoint
oLink.SetAllowControlPoint(exontrol.Swimlane.LinkControlPointEnum.exStartControlPoint | exontrol.Swimlane.LinkControlPointEnum.exEndControlPoint)
Type:
- object
Example
0 or exontrol.Swimlane.LinkControlPointEnum.exNoControlPoint {number}, displays no link's control points
3 or exontrol.Swimlane.LinkControlPointEnum.exStartControlPoint | exontrol.Swimlane.LinkControlPointEnum.exEndControlPoint {number}, displays link's start and end control points only
allowControlPoint
(static) caption :object
The caption field is mapped to the Link.Caption property, which means that the following statements are equivalent:
oLink.Options = {caption: "name"}
oLink.SetOptions({caption: "name"})
oLink.Caption = "name"
oLink.SetCaption("name")
Type:
- object
Example
null {null}, indicates no caption
"caption" {string}, declares a plain-caption
"<b>text</b>" {string}, displays the text in bold
"<img>logo</img>" {string}, displays the "logo" image. The image can be added using the exontrol.HTMLPicture.Add method
caption
(static) captionAlign :object
The captionAlign field is mapped to the Link.CaptionAlign property, which means that the following statements are equivalent:
oLink.Options = {captionAlign: "left"}
oLink.SetOptions({captionAlign: "left"})
oLink.CaptionAlign = "left"
oLink.SetCaptionAlign("left")
Type:
- object
- Since:
- 3.4
Example
null {null}, (default) the link's caption is displayed in the center
"left" {string}, exontrol.AlignEnum.exAlignLeft {exontrol.AlignEnum} or exontrol.AlignEnum.exAlignTop {exontrol.AlignEnum}, indicates that the link's caption is displayed at the starting element
"alignr" {string}, exontrol.AlignEnum.exAlignRight {exontrol.AlignEnum} or exontrol.AlignEnum.exAlignBottom {exontrol.AlignEnum}, indicates that the link's caption is displayed at the ending element
captionAlign
(static) captionFormat :object
The captionFormat field is mapped to the Link.CaptionFormat property, which means that the following statements are equivalent:
oLink.Options = {captionFormat: "left,vcenter"}
oLink.SetOptions({captionFormat: "left,vcenter"})
oLink.CaptionFormat = "left,vcenter"
oLink.SetCaptionFormat("left,vcenter")
Type:
- object
- Since:
- 3.4
Example
null {null}, (default) the link's caption is displayed in the center of the alignment point
"left,vcenter" {string}, exontrol.DrawTextFormatEnum.exTextAlignLeft | exontrol.DrawTextFormatEnum.exTextAlignVCenter {exontrol.DrawTextFormatEnum} , the link's caption is centered and aligned to the left of the alignment point
captionFormat
(static) collapsedLink :object
The collapsedLink field is mapped to the Link.CollapsedLink property, which means that the following statements are equivalent:
oLink.Options = {collapsedLink: {color: "gray", width: 1}}
oLink.SetOptions({collapsedLink: {color: "gray", width: 1}})
oLink.CollapsedLink = {color: "gray", width: 1}
oLink.SetCollapsedLink({color: "gray", width: 1})
Type:
- object
Example
null {null}, the link between collapsed elements is displayed with the control's default appearance
{color: "gray", width: 1} {DisplayLinkType}, the link between collapsed elements is displayed with a gray color and a thickness of 1 pixel
collapsedLink
(static) customPath :object
The customPath field is mapped to the Link.CustomPath property, which means that the following statements are equivalent:
oLink.Options = {customPath: "0.5,0,0.5,1"}
oLink.SetOptions({customPath: "0.5,0,0.5,1"})
oLink.CustomPath = "0.5,0,0.5,1"
oLink.SetCustomPath("0.5,0,0.5,1")
Type:
- object
Example
"0.5,0,0.5,1" defines the link to go from start (0,0) to (0.5,0), then (0.5,1), and finally to the end (1,1)
customPath
(static) from :object
The field can be of one of the following types:
- {number}, indicates a numeric value that defines the index of the element
- {string}, specifies a string expression that defines the identifier/key/plain-caption of the element
- {Element}, specifies the object reference to the element
The from field is mapped to the Link.From property, which means that the following statements are equivalent:
oLink.Options = {from: 0}
oLink.SetOptions({from: 0})
oLink.From = 0
oLink.SetFrom(0)
Type:
- object
Example
0 {number}, indicates that the link starts from the element with the index 0
"key" {string}, specifies that the link starts from the element with the giving key
from
(static) key :object
The key field is mapped to the Link.Key property, which means that the following statements are equivalent:
oLink.Options = {key: "logo"}
oLink.SetOptions({key: "logo"})
oLink.Link.Key = "logo"
oLink.SetKey("logo")
Type:
- object
Example
"logo" {string}, defines the link with the giving key (logo). You can use the Root.Item("logo") method to request the link giving its key.
key
(static) link :object
The link field is mapped to the Link.Link property, which means that the following statements are equivalent:
oLink.Options = {link: {color: "red", width: 2}}
oLink.SetOptions({link: {color: "red", width: 2}})
oLink.Link = {color: "red", width: 2}
oLink.SetLink({color: "red", width: 2})
Type:
- object
Example
null {null}, the link is displayed with the control's default appearance
{color: "red", width: 2} {DisplayLinkType}, the link is displayed with a red color and a thickness of 2 pixels
link
(static) to :object
The field can be of one of the following types:
- {number}, indicates a numeric value that defines the index of the element
- {string}, specifies a string expression that defines the identifier/key/plain-caption of the element
- {Element}, specifies the object reference to the element
The to field is mapped to the Link.To property, which means that the following statements are equivalent:
oLink.Options = {to: 0}
oLink.SetOptions({to: 0})
oLink.To = 0
oLink.SetTo(0)
Type:
- object
Example
0 {number}, indicates that the link ends to the element with the index 0
"key" {string}, specifies that the link ends to the element with the giving key
to
(static) visible :object
The visible field is mapped to the Link.Visible property, which means that the following statements are equivalent:
oLink.Options = {visible: false}
oLink.SetOptions({visible: false})
oLink.Visible = false
oLink.SetVisible(false)
Type:
- object
Example
false {boolean}, hides the link
true {boolean}, shows the link
visible