new Swimlane(client, oOptsopt)
Every option of the Swimlane.Options type has associated a property of the control. For instance, the option:
allowActions {string}, customizes the actions the user can perform once the user clicks or touches the controlis associated with the property:
AllowActions {string}, customizes the actions the user can perform once the user clicks or touches the controlwhich means that the following statements are equivalent:
oSwimlane.Options = {allowActions: "scroll"}where oSwimlane is an object of Swimlane type
oSwimlane.SetOptions({allowActions: "scroll"})
oSwimlane.AllowActions = "scroll"
oSwimlane.SetAllowActions("scroll")
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
client |
any | The client parameter indicates the control's client area as:
|
|
oOpts |
Swimlane.Options |
<optional> |
An object of Swimlane.Options type that defines different options to display the control. |
Requires:
- module:exontrol.commmon.min.js
- module:exontrol.surface.min.js
Requires
- module:exontrol.commmon.min.js
- module:exontrol.surface.min.js
Classes
Members
(static, readonly) CoordEnum :number
Each CoordEnum property can be specified in one of the following ways:
- A numeric value.
- A single enumeration constant.
- A combination of one or more compatible enumeration constants, separated by the | operator.
- A case-insensitive partial string containing one or more comma-separated names that match the enumeration constants.
For instance, the string "cartesian,allowpositiveonly" is equivalent to the numeric value 17, or to the combination of enumeration constants exCartesian | exAllowPositiveOnly.
Type:
- number
Properties:
| Name | value | Type | Description |
|---|---|---|---|
exDefCoord |
0 |
number | The positive coordinates are shown right-down to origin of the surface. |
exCartesian |
1 |
number | The elements show in Cartesian coordinates. The positive coordinates are shown right-up to origin of the surface. |
exAllowPositiveOnly |
16 |
number | Only the positive panel of the surface is shown. The exAllowPositiveOnly flag can be combined with exDefCoord or exCartesian value. For instance, the exCartesian + exAllowPositiveOnly indicates that surface displays only the positive coordinates in Cartesian system. |
- Since:
- 1.3
(static, readonly) LinkControlPointEnum :number
Each LinkControlPointEnum property can be specified in one of the following ways:
- A numeric value.
- A single enumeration constant.
- A combination of one or more compatible enumeration constants, separated by the | operator.
- A case-insensitive partial string containing one or more comma-separated names that match the enumeration constants.
For instance, the string "start,end,ortho" is equivalent to the numeric value 13, or to the combination of enumeration constants exStartControlPoint | exEndControlPoint | exOrthoArrange.
Type:
- number
Properties:
| Name | value | Type | Description |
|---|---|---|---|
exNoControlPoint |
0 |
number | The link displays no control points |
exStartControlPoint |
1 |
number | The link shows control point that changes the link's startPos field (the exStartControlPoint point is marked with black squares) |
exEndControlPoint |
2 |
number | The link shows control point that changes the link's endPos field (the exEndControlPoint point is marked with black squares) |
exControlPoint |
4 |
number | 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 |
number | 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 |
16 |
number | 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 |
32 |
number | Allows the user to adjust the link's from element by dragging and dropping the start control point (requires the exStartControlPoint flag) |
exAllowChangeTo |
64 |
number | Indicates that the user can adjust the link's to element by dragging and dropping the end control point (requires the exEndControlPoint flag) |
(static, readonly) SingleSelEnum :number
Each SingleSelEnum property can be specified in one of the following ways:
- A numeric value.
- A single enumeration constant.
- A combination of one or more compatible enumeration constants, separated by the | operator.
- A case-insensitive partial string containing one or more comma-separated names that match the enumeration constants.
For instance, the string "enable,single,disablectrlsel" is equivalent to the numeric value 11, or to the combination of enumeration constants exEnableSel | exSingleSel | exDisableCtrlSel.
Type:
- number
Properties:
| Name | value | Type | Description |
|---|---|---|---|
exDisableSel |
0 |
number | The exDisableSel value specifies that the control's selection is disabled. |
exEnableSel |
1 |
number | The exEnableSel flag specifies that the control's selection is enabled (multiple-selection, unless the exSingleSel is set ). |
exSingleSel |
2 |
number | The exSingleSel flag specifies that the user can select a element only. |
exToggleSel |
4 |
number | The exToggleSel flag specifies that the element's selection state is toggled once the user clicks a element. |
exDisableCtrlSel |
8 |
number | The exDisableCtrlSel flag disables toggling the element's selection state when user clicks a element, while CTRL modifier key is pressed. |
exDisableShiftSel |
16 |
number | The exDisableShiftSel flag disables selecting elements using the SHIFT key. |
exDisableDrag |
32 |
number | The exDisableDrag flag disables selecting elements by drag. |
(static, readonly) type :object
Type:
- object
- Since:
- 1.8
Example
console.log(exontrol.Swimlane.type); // logs "Swimlane"
(static, readonly) version :object
Type:
- object
Example
console.log(exontrol.Swimlane.version); // displays the version of the control, for instance "5.2"
AlignObjectsToGridLines :number
The AlignObjectsToGridLines property can be set to one of the following values:
- 0 {number}, no alignment is performed
- -1 {number}, the objects are aligned to minor grid lines
- 1 {number}, the objects are aligned to major grid lines
Type:
- number
- Since:
- 1.7
Example
null {null} or 0 {number}, the property has no effect (by default)
-1 {number}, the objects on the surface are aligned to the minor grid lines
1 {number}, the objects on the surface are aligned to the major grid lines
AlignObjectsToGridLines
AllowActions :string
The format of the property is:
"action(shortcut,shortcut,...),action(shortcut,shortcut,...)..."where
- "action", defines the action to perform (as defined below)
Action Description Flags "create" Creates an element by drag (not available if the control is read-only) "drag-drop" Performs drag and drop of the element (the element can be dropped inside or outside of the control). The ExDrop(event, data) method of the target HTML element is invoked once the user drops the element. The event parameter contains information about the mouse/touch event. The data parameter contains information about the source-object that initiated the drag/drop operation as {object, source, client, shape} "fit" Fits the drag-area into the control's client area "link" Links elements by drag (not available if the control is read-only) - [toggle], the link is removed if the linked-elements has already a link between
"link-cp" Allows customization of the link's path by drag (not available if the control is read-only). This action is effective only if allowLinkControlPoint field is not zero "move" Moves or resizes elements by drag (not available if the control is read-only). The allowChangeParent field specifies whether the element's position or parent can be changed at runtime by drag and drop "scroll" Scrolls the control's content by drag "select" Selects elements by drag "zoom" Zooms the control's content at dragging-point The exswimlane/js control supports additional actions as listed in the table below:
Action Description Flags "create" Creates an element or a pool by drag (For instance "create[pool](Ctrl+Alt)" creates a pool if Ctrl + Alt is pressed, while "create[element](Alt)" creates an element while the Alt key is pressed, not available if the control is read-only) - [pool], specifies that a pool is created
- [element], specifies that an element is created
"move" Moves or resizes elements by drag (For instance, "move[element]" indicates that only elements are allowed to be moved or resized, not available if the control is read-only). If flag is missing, the user can move or resize elements or pools - [pool], specifies that just pools are movable/resizable
- [element], specifies that just elements are movable/resizable
"resize-header" Resizes the pool's header (For instance, "resize-header[left,top]" specifies that just the left and top-header of the pool are resizable, not available if the control is read-only). If no flag is present, all pool's headers are resizable - [left], indicates that the left-header of the pool is resizable
- [right], indicates that the right-header of the pool is resizable
- [top], indicates that the top-header of the pool is resizable
- [bottom], indicates that the bottom-header of the pool is resizable
"resize-lane" Resizes the pool's lane (the lanes are vertically arranged) "resize-phase" Resizes the pool's phase (the phases are horizontally arranged) - "shortcut", defines the event's button or/and the modifier-keys that are required to perform the action. The "shortcut" can include one or more of the following: "Shift", "Ctrl", "Alt", "Meta", "LButton", "RButton", "MButton" and "+"
Type:
- string
Example
null {null}, indicates the control's default allowActions value
"" {string}, specifies that no operation is allowed once the user clicks or touches the control
"scroll" {string}, specifies that only "scroll" operation is allowed, no matter of the event's button or modifier-keys is pressed.
"create(Alt+LButton),move,scroll" {string}, indicates that creating-elements is possible only if the user presses the mouse's left-button while ALT key is pressed, and "move" or "scroll" is possible no matter of the event's button or modifier-keys in this order. Also, if no "create"-operation is possible, do "move"-operation, if no "move"-operation is possible, do "scroll"-operation
AllowActions
AllowChangeParent :boolean
Type:
- boolean
Example
null {null}, allows element's parent or position to be changed at runtime by drag and drop.
false {boolean}, prevents changing the element's position or parent at runtime by drag and drop.
AllowChangeParent
AllowLinkControlPoint :Swimlane.LinkControlPointEnum
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)
Type:
Example
0 or Swimlane.LinkControlPointEnum.exNoControlPoint {number}, displays no link's control points (unless the link's allowControlPoint property is different)
3 or Swimlane.LinkControlPointEnum.exStartControlPoint | Swimlane.LinkControlPointEnum.exEndControlPoint {number}, displays link's start and end control points only, for all links (unless the link's allowControlPoint property is different)
AllowLinkControlPoint
AllowUndoRedo :boolean
Type:
- boolean
- Since:
- 2.0
Example
false {boolean}, the Undo/Redo feature is disabled (by default)
true {boolean}, enables the Undo/Redo feature.
AllowUndoRedo
Axes :object
The Axes object can include the following members:
- width, {number} specifies the line's width or size (1 by default) (if 0 no axes are shown). For instance:
null {null}, indicates line of 1-pixel wide (default value)
0 {number}, indicates that no axes are shown
2 {number}, indicates line of 2-pixels wide - color, {string} indicates the line's color ("#E8E8E8" by default). For instance:
null {null}, indicates a light gray line (default value)
"transparent" {string}, specifies a transparent line
"red" {string}, specifies a red line
"#00FF00" {string}, specifies a green line
"rgba(255,0,0,0.5)" {string}, indicates 50% red line - style, {array} defines the style of the line (solid by default). Indicates an Array of numbers which specify distances to alternately draw a line and a gap. If the number of elements in the array is odd, the elements of the array get copied and concatenated. For instance:
null {null} or [] {array}, defines solid grid-lines (default style)
2 {number}, becomes [2, 2, ...]
[5, 15, 25] {array}, becomes [5, 15, 25, 5, 15, 25, ...] - cap {string}, determines the shape used to draw the end points of lines ("but" by default).
Determines the shape used to draw the end points of lines, as one of the following:
- "butt" {string}, the ends of lines are squared off at the endpoints.
- "round" {string}, the ends of lines are rounded
- "square" {string}, the ends of lines are squared off by adding a box with an equal width and half the height of the line's thickness
For instance:
null {null}, "butt" ends (default value)
"round" {string}, the ends of lines are rounded
Type:
- object
- Since:
- 1.7
CollapsedLink :DisplayLinkType
The link object includes any of the following:
- type {exontrol.LinkTypeEnum}, specifies the type of the link 0 (rectangular), 1 (direct), 2(straight) or 3(round)
- dir {number}, specifies whether the link's direction is shown or hidden as 0 (hidden), 1(shows the direction/arrow where the link begins), 2(shows the direction where the link ends, default) or 3 shows the arrows in both sides
- width {number}, specifies the link's width or size (1 by default)
- color {string}, indicates the link's color (partial-black by default)
- arrow {string}, indicates the arrow's color. If it is missing or not specified the arrow is shown using the link's color (gray by default)
- arrowSize {number}, indicates the arrow's size. If it is missing or not specified the arrow's size is defined by link's width (1 by default) (@since 2.2)
- arrowShape {object}, defines an object of exontrol.Def.Shape type to customize the shape of the link's arrow (for instance shows the link's arrow as a circle instead of a triangle) (@since 2.2)
- style {array}, specifies the link's dash pattern to show the lines (solid by default)
- startPos {any}, indicates the in-element's corners, the link can start from
- endPos {any}, indicates the out-element's corners , the link ends into
Type:
Example
{type: 0, color: "blue"} {object}, sets the link between collapsed elements as a blue rectangular line with width of 1
{type: 1, color: "red", width: 2} {object}, sets the link between collapsed elements as a red direct line with width of 2
CollapsedLink
Coord :Swimlane.CoordEnum
The Swimlane.CoordEnum type defines the following flags:
- exDefCoord(0), the positive coordinates are shown right-down to origin of the surface.
- exCartesian(1), the elements show in Cartesian coordinates. The positive coordinates are shown right-up to origin of the surface.
- exAllowPositiveOnly(0x10), only the positive panel of the surface is shown. The exAllowPositiveOnly flag can be combined with exDefCoord or exCartesian value. For instance, the exCartesian + exAllowPositiveOnly indicates that surface displays only the positive coordinates in Cartesian system.
Type:
Example
0 or Swimlane.CoordEnum.exDefCoord {number}, displays elements as the positive coordinates are shown right-down to origin of the surface.
17 or Swimlane.CoordEnum.exCartesian | Swimlane.CoordEnum.exAllowPositiveOnly {number}, indicates that surface displays only the positive coordinates in Cartesian system
Coord
Cursors :string
The format of the property is:
"cursor(part),cursor(part),..."where:
- "cursor", defines the CSS mouse cursor to display while cursor hovers the part
- "part", defines the name of the part the cursor is applied on (as defined bellow)
The "part" can be any of the following:
Cursor Description "alias" indicates a shortcut or alias will be created "all-scroll" indicates scrolling in any direction "auto" lets the browser decide the cursor based on context "cell" indicates a table cell "col-resize" indicates a column can be resized horizontally "context-menu" indicates a context menu is available "copy" indicates something will be copied "crosshair" a precise crosshair cursor "default" the default arrow cursor "e-resize" resize east (right edge) "ew-resize" resize horizontally "grab" indicates an item can be grabbed "grabbing" indicates an item is being grabbed "help" indicates help information is available "move" indicates something can be moved "n-resize" resize north (top edge) "ne-resize" resize northeast (top-right corner) "nesw-resize" resize along the northeast–southwest axis "no-drop" indicates dropping is not permitted "not-allowed" indicates the action is not allowed "ns-resize" resize vertically "nw-resize" resize northwest (top-left corner) "nwse-resize" resize along the northwest–southeast axis "pointer" the pointer cursor (a hand with a pointing finger) "progress" indicates background processing "row-resize" indicates a row can be resized vertically "s-resize" resize south (bottom edge) "se-resize" resize southeast (bottom-right corner) "sw-resize" resize southwest (bottom-left corner) "text" the text selection cursor (I-beam) "url(...)" uses a custom cursor image (with optional fallback) "vertical-text" the vertical text selection cursor "w-resize" resize west (left edge) "wait" indicates the program is busy "zoom-in" indicates zooming in "zoom-out" indicates zooming out
Cursor Description "anchor" (hyperlink) defines the mouse-cursor when the mouse pointer hovers the anchor (the <a> ex-HTML part marks an anchor or hyperlink element) (@since 2.2) "drag-drop" defines the cursor while the node is being dragged using the "drag-drop" action "element" defines the mouse-cursor when the mouse pointer hovers any element. The cursor field defines the element's indiviual cursor. "expand" (expand/collapse) defines the mouse-cursor when the mouse pointer hovers the element's expand/collapse glyphs "link-cp" (link-control-point) defines the mouse-cursor when the mouse pointer hovers any link's control point "link-cp-all" (link-control-point-all) defines the mouse-cursor when the mouse pointer hovers any link's control point (while the link is orthogonally arranged by drag and drop ~ exOrthoArrange) "link-cp-h" (link-control-point-horizontal) defines the mouse-cursor when the mouse pointer hovers a horizontal line (while the link is orthogonally arranged by drag and drop ~ exOrthoArrange) "link-cp-v" (link-control-point-vertical) defines the mouse-cursor when the mouse pointer hovers a vertical line (while the link is orthogonally arranged by drag and drop ~ exOrthoArrange)
The exswimlane/js control supports additional parts as listed in the table below:
Cursor Description "pool" (pool) defines the mouse-cursor when the mouse pointer hovers any pool
Type:
- string
Example
"pointer(xxx,yy)" {string}, indicates that the "pointer" mouse cursor is shown while cursor hovers any "xxx" or "yyy" part of the control
Cursors
(readonly) Elements :Elements
Type:
Example
The following statements are equivalents:
oSwimlane.Elements, gets the control's elements
oSwimlane.GetElements(), gets the control's elements
where oSwimlane is an object of Swimlane type
Elements
ExpandGlyphSize :number
Type:
- number
Example
0 {number}, displays no element's expand/collapse glyphs
24 {number}, specifies a size of 24x24 to display the element's expand/collapse glyphs
ExpandGlyphSize
FocusLink :number|string|Link
The FocusLink property (setter) supports the following values to specify the focused link:
- value {number}, indicates a numeric value that defines the index of the link focus
- value {string}, specifies a string expression that defines the identifier/key/plain-caption of the link focus
- value {Link}, specifies the object reference to the link to focus
The FocusLink property (getter) returns null (no link has been focused) or the link being focused as an object of Link type.
Type:
- number | string | Link
- Since:
- 3.4
Example
null {null}, removes or unfocuses the focused link (do not confuse this with removing the link entirely)
0 {number}, focuses the first link of the surface
FocusLink
FormatText :exontrol.DrawTextFormatEnum
The exontrol.DrawTextFormatEnum type support the following flags:
- exTextAlignTop (0x00), justifies the text to the top of the rectangle
- exTextAlignLeft (0x00), aligns text to the left
- exTextAlignCenter (0x01), centers text horizontally in the rectangle
- exTextAlignRight (0x02), aligns text to the right
- exTextAlignVCenter (0x04), centers text vertically
- exTextAlignBottom (0x08), justifies the text to the bottom of the rectangle.
- exTextAlignMask (0x0F), specifies the mask for text's alignment.
- exTextWordBreak (0x10), breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the lpRect parameter. A carriage return-line feed sequence also breaks the line. If this is not specified, output is on one line.
- exTextSingleLine (0x20), displays text on a single line only. Carriage returns and line feeds do not break the line.
- exTextExpandTabs (0x40), expands tab characters. The default number of characters per tab is eight.
- exPlainText (0x80), treats the text as plain text.
- exTextNoClip (0x0100), draws without clipping.
- exHTMLTextNoColors (0x0200), ignores the
and tags. - exTextCalcRect (0x0400), determines the width and height of the text.
- exHTMLTextNoTags (0x0800), ignores all HTML tags.
- exTextPathEllipsis (0x4000), for displayed text, replaces characters in the middle of the string with ellipses so that the result fits in the specified rectangle. If the string contains backslash (\) characters, exTextPathEllipsis preserves as much as possible of the text after the last backslash.
- exTextEndEllipsis (0x8000), for displayed text, if the end of a string does not fit in the rectangle, it is truncated and ellipses are added. If a word that is not at the end of the string goes beyond the limits of the rectangle, it is truncated without ellipses.
- exTextWordEllipsis (0x040000), truncates any word that does not fit in the rectangle and adds ellipses.
Type:
- exontrol.DrawTextFormatEnum
Example
null {null}, centers the caption
32 or exontrol.DrawTextFormatEnum.exTextSingleLine {number}, defines a single-line caption
0x2A or exontrol.DrawTextFormatEnum.exTextSingleLine | exontrol.DrawTextFormatEnum.exTextAlignRight | exontrol.DrawTextFormatEnum.exTextAlignBottom {number}, defines a single-line caption right/bottom-aligned
FormatText
ImageAlign :number
The value of ImageAlign property can be:
- 0, the image is on the left of the element's caption
- 1, the image is on the right of the element's caption
- 2, the image is on the top of the element's caption
- 3, the image is on the bottom of the element's caption
Type:
- number
Example
null {null}, the image is on top of the element's cation (default value)
1 {number}, the image is displayed to the right of the element's caption
ImageAlign
ImageSize :any
The value of ImageSize property can be:
- {null}, indicates that the element's image is displayed as it is (full-sized).
- {number}, specifies that the element's image is displayed into a square of giving size (same width and height). If 0 the element displays no image, if negative the element's image is stretched to giving square, else the element's picture is scaled to fit the giving rectangle.
- {array}, specifies an array of [aspect-width,aspect-height] type that defines the limits for width or/and height. The aspect-width and aspect-height define the width/height of the element's picture to scale or stretch to.
Type:
- any
Example
null {null}, indicates that the element's image is displayed as it is (full-sized).
0 {number}, no image is displayed
64 {number}, the image is scaled to fit a 64 x 64 rectangle
-64 {number}, the image is strected to a 64 x 64 rectangle
[32,64] {array}, scales the image to the largest ratio-rectangle (32 x 64) that fits the client
[-32,-64] {array}, stretches the image to a 32 x 64 rectangle
ImageSize
Layout :string
Currently, the control's Layout property serializes the following:
- layout of windows (size, dock, parent)
- selected elements
- expand/collapse elements
- control's zoom
Type:
- string
- Since:
- 1.8
Example
The following statements are equivalents:
oSwimlane.SetLayout(layout), restores the control's layout from the giving layout string
oSwimlane.Layout = layout, restores the control's layout from the giving layout string
where oSwimlane is an object of Swimlane type and layout is a string expression that defines the UI layout to apply
Layout
LinkEndTo :DisplayLinkType
The link object includes any of the following:
- type {exontrol.LinkTypeEnum}, specifies the type of the link 0 (rectangular), 1 (direct), 2(straight) or 3(round)
- dir {number}, specifies whether the link's direction is shown or hidden as 0 (hidden), 1(shows the direction/arrow where the link begins), 2(shows the direction where the link ends, default) or 3 shows the arrows in both sides
- width {number}, specifies the link's width or size (1 by default)
- color {string}, indicates the link's color (partial-black by default)
- arrow {string}, indicates the arrow's color. If it is missing or not specified the arrow is shown using the link's color (gray by default)
- arrowSize {number}, indicates the arrow's size. If it is missing or not specified the arrow's size is defined by link's width (1 by default) (@since 2.2)
- arrowShape {object}, defines an object of exontrol.Def.Shape type to customize the shape of the link's arrow (for instance shows the link's arrow as a circle instead of a triangle) (@since 2.2)
- style {array}, specifies the link's dash pattern to show the lines (solid by default)
- startPos {any}, indicates the in-element's corners, the link can start from
- endPos {any}, indicates the out-element's corners , the link ends into
Type:
Example
null {null}, sets the appearance of the link that ends to any selected-element (incoming links)
{type: 1, color: "red", width: 2} {object}, sets the appearance of the link that ends to any selected-element (incoming links) as direct red lines with width of 2
LinkEndTo
LinkStartFrom :DisplayLinkType
The link object includes any of the following:
- type {exontrol.LinkTypeEnum}, specifies the type of the link 0 (rectangular), 1 (direct), 2(straight) or 3(round)
- dir {number}, specifies whether the link's direction is shown or hidden as 0 (hidden), 1(shows the direction/arrow where the link begins), 2(shows the direction where the link ends, default) or 3 shows the arrows in both sides
- width {number}, specifies the link's width or size (1 by default)
- color {string}, indicates the link's color (partial-black by default)
- arrow {string}, indicates the arrow's color. If it is missing or not specified the arrow is shown using the link's color (gray by default)
- arrowSize {number}, indicates the arrow's size. If it is missing or not specified the arrow's size is defined by link's width (1 by default) (@since 2.2)
- arrowShape {object}, defines an object of exontrol.Def.Shape type to customize the shape of the link's arrow (for instance shows the link's arrow as a circle instead of a triangle) (@since 2.2)
- style {array}, specifies the link's dash pattern to show the lines (solid by default)
- startPos {any}, indicates the in-element's corners, the link can start from
- endPos {any}, indicates the out-element's corners , the link ends into
Type:
Example
null {null}, sets the appearance of the link that starts from any selected-element (outgoing links)
{type: 1, color: "red", width: 2} {object}, sets the appearance of the link that starts from any selected-element (outgoing links) as direct red lines with width of 2
LinkStartFrom
LinkUnselected :DisplayLinkType
The link object includes any of the following:
- type {exontrol.LinkTypeEnum}, specifies the type of the link 0 (rectangular), 1 (direct), 2(straight) or 3(round)
- dir {number}, specifies whether the link's direction is shown or hidden as 0 (hidden), 1(shows the direction/arrow where the link begins), 2(shows the direction where the link ends, default) or 3 shows the arrows in both sides
- width {number}, specifies the link's width or size (1 by default)
- color {string}, indicates the link's color (partial-black by default)
- arrow {string}, indicates the arrow's color. If it is missing or not specified the arrow is shown using the link's color (gray by default)
- arrowSize {number}, indicates the arrow's size. If it is missing or not specified the arrow's size is defined by link's width (1 by default) (@since 2.2)
- arrowShape {object}, defines an object of exontrol.Def.Shape type to customize the shape of the link's arrow (for instance shows the link's arrow as a circle instead of a triangle) (@since 2.2)
- style {array}, specifies the link's dash pattern to show the lines (solid by default)
- startPos {any}, indicates the in-element's corners, the link can start from
- endPos {any}, indicates the out-element's corners , the link ends into
Type:
Example
null {null}, sets the appearance of the link not related to any selected-element (unselected links)
{type: 1, color: "red", width: 2} {object}, sets the appearance of the link not related to any selected-element (unselected links) as direct red lines with width of 2
LinkUnselected
(readonly) Links :Links
Type:
Example
The following statements are equivalents:
oSwimlane.Links, gets the control's links
oSwimlane.GetLinks(), gets the control's links
where oSwimlane is an object of Swimlane type
Links
Listeners :object
Type:
- object
Example
The following sample shows how you can get all events the component currently supports:
oSwimlane.Listeners.forEach(function(name)
{
console.log(name);
});
The following sample displays the element being clicked:
oSwimlane.Listeners.Add("onclick", function (oEvent)
{
console.log(oEvent);
});
or
oSwimlane.on("click", function (oEvent)
{
console.log(oEvent);
});
where oSwimlane is an object of Swimlane type
Listeners
Locked :boolean
Type:
- boolean
Example
false {boolean}, the user can create, resize or move any element
true {boolean}, the user can not create, resize or move any element.
Locked
MajorGridLines :object
The MajorGridLines object can include the following members:
- step, {number} specifies the distance between two consecutive major grid-lines (100 by default) (if 0 the major grid-lines are ignored). For instance:
null {null}, the distance between two consecutive major grid-lines is 10 (default value)
0 {number}, the major grid-lines are ignored
5 {number}, show the major grid-lines from 5 to 5 - width, {number} specifies the line's width or size (1 by default) (if 0 no major grid-lines are shown). For instance:
null {null}, indicates line of 1-pixel wide (default value)
0 {number}, indicates that no major grid-lines are shown
2 {number}, indicates line of 2-pixels wide - color, {string} indicates the line's color ("#E8E8E8" by default). For instance:
null {null}, indicates a light gray line (default value)
"transparent" {string}, specifies a transparent line
"red" {string}, specifies a red line
"#00FF00" {string}, specifies a green line
"rgba(255,0,0,0.5)" {string}, indicates 50% red line - style, {array} defines the style of the line (solid by default). Indicates an Array of numbers which specify distances to alternately draw a line and a gap. If the number of elements in the array is odd, the elements of the array get copied and concatenated. For instance:
null {null} or [] {array}, defines solid grid-lines (default style)
2 {number}, becomes [2, 2, ...]
[5, 15, 25] {array}, becomes [5, 15, 25, 5, 15, 25, ...] - cap {string}, determines the shape used to draw the end points of lines ("but" by default).
Determines the shape used to draw the end points of lines, as one of the following:
- "butt" {string}, the ends of lines are squared off at the endpoints.
- "round" {string}, the ends of lines are rounded
- "square" {string}, the ends of lines are squared off by adding a box with an equal width and half the height of the line's thickness
For instance:
null {null}, "butt" ends (default value)
"round" {string}, the ends of lines are rounded
Type:
- object
- Since:
- 1.7
Example
null {null}, the major grid-lines are shown from 100 to 100
{step: 0} {object}, the major grid-lines are ignored
{color: "gray"} {object}, the major grid-lines are shown in gray
MajorGridLines
Margins :object
Type:
- object
Example
null {null}, uses the default margins of {border: 16, x: 2, y: 2, indent: 16}
{border: 0, x: 0, y: 0, indent: 0} {object}, specifies no margins, so elements are drawn at the very edge of the control and without indent
Margins
MinorGridLines :object
The MinorGridLines object can include the following members:
- step, {number} specifies the distance between two consecutive minor grid-lines (10 by default) (if 0 the minor grid-lines are ignored). For instance:
null {null}, the distance between two consecutive minor grid-lines is 10 (default value)
0 {number}, the minor grid-lines are ignored
5 {number}, show the minor grid-lines from 5 to 5 - width, {number} specifies the line's width or size (1 by default) (if 0 no minor grid-lines are shown). For instance:
null {null}, indicates line of 1-pixel wide (default value)
0 {number}, indicates that no minor grid-lines are shown
2 {number}, indicates line of 2-pixels wide - color, {string} indicates the line's color ("#F8F8F8" by default). For instance:
null {null}, indicates a light gray line (default value)
"transparent" {string}, specifies a transparent line
"red" {string}, specifies a red line
"#00FF00" {string}, specifies a green line
"rgba(255,0,0,0.5)" {string}, indicates 50% red line - style, {array} defines the style of the line (solid by default). Indicates an Array of numbers which specify distances to alternately draw a line and a gap. If the number of elements in the array is odd, the elements of the array get copied and concatenated. For instance:
null {null} or [] {array}, defines solid grid-lines (default style)
2 {number}, becomes [2, 2, ...]
[5, 15, 25] {array}, becomes [5, 15, 25, 5, 15, 25, ...] - cap {string}, determines the shape used to draw the end points of lines ("but" by default).
Determines the shape used to draw the end points of lines, as one of the following:
- "butt" {string}, the ends of lines are squared off at the endpoints.
- "round" {string}, the ends of lines are rounded
- "square" {string}, the ends of lines are squared off by adding a box with an equal width and half the height of the line's thickness
For instance:
null {null}, "butt" ends (default value)
"round" {string}, the ends of lines are rounded
Type:
- object
- Since:
- 1.7
Example
null {null}, the minor grid-lines are shown from 10 to 10
{step: 0} {object}, the minor grid-lines are ignored
{color: "gray"} {object}, the minor grid-lines are shown in gray
MinorGridLines
Options :Swimlane.Options
Every option of the Swimlane.Options type has associated a property of the link. For instance, the option:
showLinks, defines whether to show the links between elementsis associated with the property:
ShowLinks {string}, defines whether to show the links between elementswhich means that the following statements are equivalent:
oSwimlane.Options = {showLinks: "show"}where oSwimlane is a reference to the Swimlane control.
oSwimlane.SetOptions({showLinks: "show"})
oSwimlane.ShowLinks = "show"
oSwimlane.SetShowLinks("show")
It is important to note that changing a field of the Options object does not automatically update the control. For example, oSwimlane.Options.showLinks = "show" does not apply the change. Instead, you must assign the Options property again, such as oSwimlane.SetOptions({showLinks: "show"}), so the control updates and applies the new value.
Type:
- Since:
- 1.8
Example
{showLinks: "show,extend"} {object}, indicates that the links are shows and extended
Options
Origin :object
The Origin object can include the following members:
- size, {number} indicates the size of the origin (the size of the cross) (8 by default). For instance:
null {null}, defines an 8-pixels wide cross (default size)
16 {number}, defines a 16-pixels wide cross - width, {number} specifies the line's width or size (1 by default) (if 0 no surface's origin is shown). For instance:
null {null}, indicates line of 1-pixel wide (default width)
0 {number}, indicates that no surface's origin is shown
2 {number}, indicates line of 2-pixels wide - color, {string} indicates the line's color (black by default). For instance:
null {null}, indicates a black line (default color)
"transparent" {string}, specifies a transparent line
"red" {string}, specifies a red line
"#00FF00" {string}, specifies a green line
"rgba(255,0,0,0.5)" {string}, indicates 50% red line - style, {array} defines the style of the line (solid by default). Indicates an Array of numbers which specify distances to alternately draw a line and a gap. If the number of elements in the array is odd, the elements of the array get copied and concatenated. For instance:
null {null} or [] {array}, defines solid grid-lines (default style)
2 {number}, becomes [2, 2, ...]
[5, 15, 25] {array}, becomes [5, 15, 25, 5, 15, 25, ...] - cap {string}, determines the shape used to draw the end points of lines ("but" by default).
Determines the shape used to draw the end points of lines, as one of the following:
- "butt" {string}, the ends of lines are squared off at the endpoints.
- "round" {string}, the ends of lines are rounded
- "square" {string}, the ends of lines are squared off by adding a box with an equal width and half the height of the line's thickness
For instance:
null {null}, "butt" ends (default value)
"round" {string}, the ends of lines are rounded
Type:
- object
- Since:
- 1.7
Example
null {null}, the control's origin is black, 1-pixel wide and solid
{color: "gray", width: 2} {object}, the control's origin is gray, solid and 2-pixel wide
Origin
Pad :number|Array.<number>|string
The value of Pad property can be:
- {number} a numeric value, to pad horizontal and vertical size with the same value
- {(number[]|string)} a "x,y" or [x,y] type to specify the padding on h/v size
Type:
- number | Array.<number> | string
Example
null {null}, indicates that the default padding value of [4,4] is applied
0 {number}, indicates no padding
"8,4" {string}, increases the element's width with 2 * 8-pixels and element's height with 2 * 4-pixels
[8,4] {array}, increases the element's width with 2 * 8-pixels and element's height with 2 * 4-pixels
Pad
Pools :Pools
Type:
Example
The following statements are equivalent:
oSwimlane.Pools {Pools}, gets the control's pools as an object of Pools type
oSwimlane.GetPools() {Pools}, gets the control's pools as an object of Pools type
where oSwimlane is an object of Swimlane type
Pools
ReadOnly :boolean
Type:
- boolean
Example
false {boolean}, the user can create, resize or move any element
true {boolean}, the user can not create, resize or move any element, but can scroll, select or interact with any element.
ReadOnly
ScrollBars :exontrol.ScrollBarsEnum
The ScrollBars property uses the exontrol.ScrollBarsEnum enumeration as explained:
- exNoScroll (0), specifies that no scroll bars are shown (scroll is not allowed)
- exHorizontal (1), specifies that only the horizontal scroll bar is shown
- exVertical (2), specifies that only the vertical scroll bar is shown
- exBoth (3), specifies that both horizontal and vertical scroll bars are shown if the content is larger than the control's client area
- exDisableNoHorizontal (5), specifies that the horizontal scroll bar is always shown; it is disabled if it is unnecessary
- exDisableNoVertical (10), specifies that the vertical scroll bar is always shown; it is disabled if it is unnecessary
- exDisableBoth (15), specifies that both horizontal and vertical scroll bars are always shown; they are disabled if they are unnecessary
- exHScrollOnThumbRelease (0x100), specifies that the control's content is horizontally scrolled as soon as the user releases the thumb of the horizontal scroll bar
- exVScrollOnThumbRelease (0x200), specifies that the control's content is vertically scrolled as soon as the user releases the thumb of the vertical scroll bar
- exScrollOnThumbRelease (0x300), specifies that the control's content is scrolled as soon as the user releases the thumb of the scroll bar
- exHScrollEmptySpace (0x400), allows empty space when the control's content is horizontally scrolled to the end
- exVScrollEmptySpace (0x800), allows empty space when the control's content is vertically scrolled to the end
- exScrollEmptySpace (0xC00), allows empty space when the control's content is scrolled to the end
- exExtendSBS (0x3000), specifies that the control's scroll bars are visible only when the cursor hovers the window; the control's client area is extended over the scroll bar portion
- exMinSBS (0xC000), specifies that the control's scroll bars are shown as minimized
- exHideSBS (0x10000), specifies that no scroll bars are shown (scroll is allowed)
Type:
- exontrol.ScrollBarsEnum
Example
exontrol.ScrollBarsEnum.exBoth or 3 {number}, specifies that both horizontal and vertical scroll bars are shown if the content is larger than the control's client area
exontrol.ScrollBarsEnum.exNoScroll or 0 {number}, specifies that no scroll bars are shown (scroll is not allowed)
ScrollBars
ScrollBarsHome :string
Type:
- string
Example
null {null}, hides the origin (0,0) on the control's scroll bar
"black" {string}, shows the origin (0,0) on the control's scroll bar in black
ScrollBarsHome
ScrollBarsLayout :string
Type:
- string
Example
null {null}, hides the position of the current layout within the control's scroll bars.
"black" {string}, shows in black the position of the current layout within the control's scroll bars.
ScrollBarsLayout
Selection :any
The Selection property can take any of the following:
- {null}, clears the entire selection (unselect all)
- {number}, selects an element giving index within the elements collection
- {string}, selects an element giving its identifier/key/plain-caption
- {Element}, selects an element giving its reference
- {Elements}, selects all elements within the control
- {array}, specifies an array of [type] type, where type could be any number, string or Swimlane.Element
The Selection property can return any of the following:
- {null}, indicates that the control has no selected-elements
- {Element}, indicates a single-selected element (while the control support single-selection only)
- {array[Element]}, defines a collection of selected-elements within the control
Type:
- any
Example
The following statements are equivalents:
oSwimlane.Selection = "aka", selects the element with the 'aka' key
oSwimlane.SetSelection("aka"), selects the element with the 'aka' key
oSwimlane.Selection {any}, gets the control's selection to sel variable
oSwimlane.GetSelection() {any}, gets the control's selection to sel variable
where oSwimlane is an object of Swimlane type
Selection
Selements :string
The format of the string representation is (everything between () refers to children, and everything between [] refers to flags):
"element1[flag=value]...[flag=value](sub-element1[flag=value]...[flag=value],...,sub-elementn[flag=value]...[flag=value]),...,elementn[flag=value]...[flag=value](sub-element1[flag=value]...[flag=value],...,sub-elementn[flag=value]...[flag=value])"
where the element1, sub-element1 ... elementn defines the caption for each element (can include ex-HTML tags).
The string representation supports the following flags:
- [key] {string}, specifies the element's key (Key/GetKey()/SetKey(value) methods of Swimlane.Element). For instance, [key=root], specifies that the element's key is "root"
- [vis]/[hid] {number}, shows or hides the element (Visible/GetVisible()/SetVisible(value) methods of Swimlane.Element). For instance, [hid] or [vis=0], hides the element, while [vis=1] shows the element
- [dis] {number}, enables or disables the element (Enabled/GetEnabled()/SetEnabled(value) methods of Swimlane.Element). For instance, [dis] or [dis=0], disables the element, while [dis=1] enables the element
- [nsel] {number}, indicates whether the user can select, resize or move the element (Selectable/GetSelectable()/SetSelectable(value) methods of exontrol.Swimlane.Element). For instance, [nsel] or [nsel=0], forces the element to be unselectable, while [nsel=1] makes the element selectable
- [pos] {number}, changes the element's position (0-based) (Position/GetPosition()/SetPosition(value) methods of Swimlane.Element). For instance, [pos=0] indicates that the element should be displayed first
- [img] {string}, assigns a image/picture to the element (Image/GetImage()/SetImage(value) methods of Swimlane.Element). For instance, [img=logo] assigns the "logo" picture to the element. The image can be added using the exontrol.HTMLPicture.Add method. You can use the [simg] flag to define the element's image to be displayed on the "sub-items" portion of the control.
- [imgs] {string}, defines the size of the element's image as a string of "aspect-width,aspect-height" type (without quotes) (ImageSize/GetImageSize()/SetImageSize(value) methods of Swimlane.Element). For instance, [imgs=-32] stretches the element's image into a square of 32x32 size, while [imgs=32,32] fits the element's image into a square of 32x32 size.
- [imga] {number}, specifies the alignment of the image within the element relative to its caption. The value of "imga" flag can be 0(left), 1(right), 2(top) or 3(bottom). (ImageAlign/GetImageAlign()/SetImageAlign(value) methods of Swimlane.Element). For instance, [imga=3] aligns the element's image at the bottom of its box
- [client] {string}, specifies the element's client-rectangle as a string of "x,y,width,height" type (without quotes) (Client/GetClient()/SetClient(value) methods of Swimlane.Element). For instance, [client=0,0,128,128] specifies the element's client are to [0,0,128,128]
- [coll] {string}, indicates a collapsed-element (Expand/GetExpand()/SetExpand(value) methods of Swimlane.Element). For instance, [coll] or [coll=0], collapses the element, while [c=1] expands the element
- [ft] {number}, specifies the format to display the element's caption. The value of "ft" flag can be a combination of one or more values of exontrol.DrawTextFormatEnum type (FormatText/GetFormatText()/SetFormatText(value) methods of Swimlane.Element). For instance, [ft=32] displays the element's caption on a single line only. Carriage returns and line feeds do not break the line (32 indicates the value of exontrol.DrawTextFormatEnum.exTextSingleLine)
- [pad] {string}, defines the element's padding (space between the element's content and its border) (Pad/GetPad()/SetPad(value) methods of Swimlane.Element). For instance, [pad=4] defines a 4-pixels padding for all edges
- [shape] {string}, defines the shape for individual element (Shape/GetShape()/SetShape(value) methods of Swimlane.Element). For instance, [shape=Button] specifies that the element is shown as a "button".
- [cursor] {string}, defines the mouse-cursor for individual element (Cursor/GetCursor()/SetCursor(value) methods of Swimlane.Element). For instance, [cursor=wait] indicates that the "wait" mouse-cursor is displayed while the cursor hovers the element
- [auto] {number}, resizes the element to fit its content (AutoSize/GetAutoSize()/SetAutoSize(value) methods of Swimlane.Element). For instance, [auto] resizes the element to fit its content
- [nres] {number}, defines a non-resizable element (Resizable/GetResizable()/SetResizable(value) methods of Swimlane.Element). For instance, [nres] indicates that the user can not resize the element by drag and drop
- [nmov] {number}, defines a non-movable element (Movable/GetMovable()/SetMovable(value) methods of Swimlane.Element). For instance, [nmov] indicates that the user can not move the element by drag and drop
Type:
- string
Example
"" {string}, clears the elements collection
"A(A1,A2,A3),B[client=128,128,32,32](B1,B2(B2.1,B2.2),B3)" {string}, defines the element "A" with three child-elements "A1", "A2" and "A2", and element "B" with child-elements "B1", "B2", and "B3", also defines the "B2.1" and "B2.2" as children of element "B2"
"A[img=logo][hid],B[client=128,128,32,32][dis]" {string}, defines the element "A" hidden and with the image "logo" and element "B" as disabled.
Selements
Shapes :string
The format of the property is:
"shape(part),shape(part),..."where:
- "shape", defines the shape to apply on the UI part as one of the following:
◦ any of 140 color names any browser supports (such as red, blue, green, ...)
◦ hexadecimal colors, is specified with: #RRGGBB, where the RR (red), GG (green) and BB (blue) hexadecimal integers specify the components of the color. All values must be between 00 and FF (such as #0000ff which defines a blue background)
◦ hexadecimal colors with transparency, is specified with: #RRGGBBAA, where AA (alpha) value must be between 00 and FF (such as #0000ff80 which defines a semi-transparent blue background)
◦ RGB colors, is specified with the RGB(red, green, blue) function. Each parameter (red, green, and blue) defines the intensity of the color and can be an integer between 0 and 255( such as rgb(0,0,255) that defines a blue background)
◦ RGBA colors, are an extension of RGB color values with an alpha channel as RGBA(red, green, blue, alpha) function, where the alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque) ( such as rgba(0,0,255,0.5) which defines a semi-transparent blue background)
◦ HSL colors, is specified with the HSL(hue, saturation, lightness) function, where hue is a degree on the color wheel (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue. saturation is a percentage value; 0% means a shade of gray and 100% is the full color. lightness is also a percentage; 0% is black, 100% is white. HSL stands for hue, saturation, and lightness - and represents a cylindrical-coordinate representation of colors (such as hsl(240, 100%, 50%) that defines a blue background)
◦ HSLA colors, are an extension of HSL color values with an alpha channel - which specifies the opacity of the object as HSLA(hue, saturation, lightness, alpha) function, where alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque) (such as hsla(240, 100%, 50%,0.5) that defines a semi-transparent blue background)
◦ a JSON representation of the shape object to apply (while it starts with { character, such as '{"normal": {"primitive": "RoundRect","fillColor":"black","tfi": {"fgColor": "white"}}}')
◦ specifies the name of the field within the exontrol.Shapes.Swimlane object (while it starts with a lowercase letter, such as element which refers to exontrol.Shapes.Swimlane.element shape)
◦ specifies the name of the field within the exontrol.Shapes object (while it starts with an uppercase letter, such as Button which refers to exontrol.Shapes.Button shape)
- "part", defines the name of the part the shape is applied on (as defined bellow)
Part Description "element" defines the visual-appearance of all elements within the control. The shape field defines the shape for individual element. "expand" specifies the visual appearance for expand/collapse glyphs. The expandGlyphSize field specifies the size to show the element's expand/collapse glyphs. "frameDrag" specifies the visual appearance to display the frame while dragging the objects "frameFit" defines the visual-appearance to display the frame while fitting objects into the control's client area by drag "frameSel" defines the visual appearance to display a frame while selecting objects by drag "link-be" defines the visual-appearance of the link's end control-point (it changes the end-position of the link) "link-bs" defines the visual-appearance of the link's start control-point (it changes the start-position of the link) "link-m" defines the visual-appearance of the link's middle control-point "link-p" defines the visual-appearance of the link's intermediate control-point "multiSel" specifies the visual appearance to show the count of multiple-selected items "select" defines the visual-appearance of selected-element
The exswimlane/js control supports additional parts as listed in the table below:
Part Description "header" defines the visual-appearance of all headers within the control "lane" defines the visual-appearance of all lanes for all pools "laneAlt" defines the visual-appearance of alternate lanes for all pools "phase" defines the visual-appearance of all phases for all pools "phaseAlt" defines the visual-appearance of alternate phases for all pools "pool" defines the visual-appearance of all pools within the control
Type:
- string
Example
null {null}, specifies the default visual appearance
"" {string}, no shape (no visual appearance is applied to any part of the control)
"red(element)", "#FF0000(element)", "rgb(255,0,0)(element)", "rgba(255,0,0,1)(element)" {string}, shows all-elements in red
'{"hover":{"frameColor":"black","pad":-0.5}}(element)' {string}, draws a black-frame arround the element being hovered
"xxx(d),yyy(d,m),zzz(y)" {string}, specifies that the exontrol.Shapes.Swimlane.xxx combined with exontrol.Shapes.Swimlane.yyy object defines the visual appearance of "d" part of the control, exontrol.Shapes.Swimlane.yyy object defines the visual appearance of "m" part of the control and exontrol.Shapes.Swimlane.zzz object defines the visual appearance of "y" part of the control
Shapes
Shortcuts :object
Type:
- object
Example
The following sample removes the selection (calls the RemoveSelection() method) once the user presses the Delete key:
oSwimlane.Shortcuts.Add( "Delete", oSwimlane.RemoveSelection, oSwimlane );
where oSwimlane is an object of Swimlane type
Shortcuts
ShowAxes :boolean
Type:
- boolean
- Since:
- 1.7
Example
false {boolean}, the control hides the axes
null {null} or true {boolean}, the control shows the axes
ShowAxes
ShowGridLines :boolean
Type:
- boolean
- Since:
- 1.7
Example
false {boolean}, the control hides the grid lines (minor and major grid-lines)
null {null} or true {boolean}, the control shows the grid lines (minor and major grid-lines)
ShowGridLines
ShowLinks :exontrol.ShowLinksEnum
The exontrol.ShowLinksEnum type supports the following flags:
- exHide (0), specifies that no links are visible
- exExtended (0x01) specifies that links are shown as extended. This means the control automatically arranges both the start and end points of the links so they do not overlap. For example, if multiple links start from or end at the same element, the control ensures that each link uses a different start or end point instead of all sharing the same position. This helps keep the connections visually separated and easier to distinguish.
- exShow (0x02), specifies that links are visible (the links are always shown while not exHide)
- exFront (0x10), specifies that links are shown in front (by default, the control are shown on the background)
- exCrossRect (0x20) specifies that links are shown with rectangular cross-links. When two links intersect, the control displays the crossing using a rectangular bridge so one link appears to pass over the other without merging. This makes intersections easier to read and helps visually distinguish overlapping links.
- exCrossTriangle (0x20) specifies that links are shown with triangular cross-links. When two links intersect, the control displays the crossing using a triangular marker so one link appears to pass over the other without merging. This helps clearly indicate link intersections and improves the readability of overlapping connections.
- exCrossMixt (0x60) specifies that links are shown using mixed cross-links. When two links intersect, the control displays the crossing using a combination of cross-link styles (such as rectangular or triangular bridges) so one link appears to pass over the other without merging. This mixed representation helps visually distinguish intersections and improves the readability of overlapping links.
- exPreventOverlap (0x100), adjusts the links to prevent them from overlapping the connected objects. The exPreventOverlap flag has effect only for rectangular links. The exPreventOverlap option calculates the path between A and B using the A* (A-star) pathfinding algorithm, which can be a time-consuming operation. The exontrol.L.PO.dir.def specifies the default directions for determining the best route between two points, A and B. These directions are represented as a combination of the letters R (Right), L (Left), U (Up), and D (Down), separated by commas ("RLDU,DURL" {string}, indicates the shortest route between RLDU and DURL directional path). When used with the exPreventOverlapMixt flag, it ensures that links avoid overlapping with elements or obstacles, enabling their paths to include both rectangular and diagonal lines. (@since 4.0)
- exPreventOverlapMixt (0x80), When used with the exPreventOverlap flag, it ensures that links avoid overlapping with elements or obstacles, enabling their paths to include both rectangular and diagonal lines. When combined with the exChangeColorOnOverlap flag, overlapping links alternately adjust their width in addition to changing colors. The exPreventOverlapMixt flag must always be used alongside either the exPreventOverlap or exChangeColorOnOverlap flag. (@since 4.0)
- exChangeColorOnOverlap (0x200), changes the color for links in areas where they overlap with other links, enhancing clarity and distinction between them. The exontrol.L.PO.OverlapColors defines the list of colors, separated by commas, used to display overlapping links. When combined with the exPreventOverlapMixt flag, overlapping links alternately adjust their width in addition to changing colors. (@since 4.0)
Type:
- exontrol.ShowLinksEnum
Example
0 or exontrol.ShowLinksEnum.exHide {number}, hides the links
1 or exontrol.ShowLinksEnum.exShow {number}, shows the links (on the background)
33 or exontrol.ShowLinksEnum.exExtended | exontrol.ShowLinksEnum.exCrossRect {number}, shows "extended" and "cross" links
ShowLinks
ShowLinksOnCollapse :boolean
Type:
- boolean
Example
null {null}, shows links between collapsed elements
false {boolean}, hides the links between collapsed elements
ShowLinksOnCollapse
ShowOrigin :boolean
Type:
- boolean
- Since:
- 1.7
Example
false {boolean}, the control hides the origin
null {null} or true {boolean}, the control shows the origin
ShowOrigin
SingleSel :Swimlane.SingleSelEnum
The Swimlane.SingleSelEnum type defines the following flags:
- exDisableSel(0), specifies that the control's selection is disabled (can not be combined with any other flags)
- exEnableSel(1), specifies that the control's selection is enabled (multiple-selection, unless the exSingleSel is set )
- exSingleSel(2), specifies that the user can select a element only
- exToggleSel(4), specifies that the element's selection state is toggled once the user clicks a element.
- exDisableCtrlSel(8), disables toggling the element's selection state when user clicks a element, while CTRL modifier key is pressed.
- exDisableShiftSel(16), disables selecting elements using the SHIFT key.
- exDisableDrag(32), disables selecting elements by drag.
Type:
Example
0 or Swimlane.SingleSelEnum.exDisableSel {number}, disables selecting any element
3 or Swimlane.SingleSelEnum.exSingleSel | Swimlane.SingleSelEnum.exEnableSel {number}, enables control's single selection, so only a single element can be selected
6 or Swimlane.SingleSelEnum.exToggleSel | Swimlane.SingleSelEnum.exSingleSel {number}, enables control's single and toggle selection, which means that once a element is selected it gets unselected once it is clicked, or reverse, and only a single-element can be selected at once.
SingleSel
Slinks :string
The format of the string representation is (everything between [] refers to flags):
"link1[flag=value]...[flag=value],...,linkn[flag=value]...[flag=value]"
where the link1, ... linkn defines the caption for each link (can include ex-HTML tags).
The string representation supports the following flags:
- [link] {string} (required), indicates the link's in-out elements in "from-to" format, where from/to indicates the element's key, plain-caption or index (0-based). For instance, [link=11-1], links the elements with index 11 and 1, or [link=root-1] links the element with the key "root" or plain-caption "root" with the element of index 1.
- [key] {string}, specifies the link's key (Key/GetKey()/SetKey(value) methods of Swimlane.Link). For instance, [key=L1], specifies that the link's key is "L1"
- [vis]/[hid] {number}, shows or hides the link (Visible/GetVisible()/SetVisible(value) methods of Swimlane.Link). For instance, [hid] or [vis=0], hides the link, while [vis=1] shows the link
- [type] {number}, specifies the type of the link as a value of 0 (rectangular), 1 (direct), 2(straight) or 3(round). For instance, [type=3] defines a round-link
- [dir] {number}, specifies whether the link's direction is shown or hidden as 0 (hidden), 1(shows the direction/arrow where the link begins), 2(shows the direction where the link ends, default) or 3 shows the arrows in both sides. For instance, [dir=3] shows the arrows in both-directions of the link.
- [width] {number}, specifies the link's width or size. For instance, [width=4] shows a wider link.
- [color] {string}, indicates the link's color. For instance, [color=red] specifies a red-link.
- [arrow] {string}, indicates the arrow's color. For instance, [arrow=#808080] shows the link's arrow in gray.
- [style] {number}, specifies the link's dash pattern to show the lines. For instance, [style=2] shows a dotted-link
- [startPos] {string}, indicates a list of corners separated by comma(,) which can be any of "TL", "TC", "TR", "ML", "MR", "BL", "BC" or "BR" of in-element, where the link can start from. For instance, [startPos=TR,MR,BR] specifies that the link can start anywhere on the in-element's right-side
- [endPos] {string}, indicates a list of corners separated by comma(,) which can be any of "TL", "TC", "TR", "ML", "MR", "BL", "BC" or "BR" of out-element, where the link can end into. For instance, [endPos=TL,ML,BL] specifies that the link can end anywhere on the out-element's left-side
- [coll-type] {number}, specifies the type of the link as a value of 0 (rectangular), 1 (direct), 2(straight) or 3(round). For instance, [coll-type=3] defines a round-link
- [coll-dir] {number}, specifies whether the link's direction is shown or hidden as 0 (hidden), 1(shows the direction/arrow where the link begins), 2(shows the direction where the link ends, default) or 3 shows the arrows in both sides. For instance, [coll-dir=3] shows the arrows in both-directions of the link.
- [coll-width] {number}, specifies the link's width or size. For instance, [coll-width=4] shows a wider link.
- [coll-color] {string}, indicates the link's color. For instance, [coll-color=red] specifies a red-link.
- [coll-arrow] {string}, indicates the arrow's color. For instance, [coll-arrow=#808080] shows the link's arrow in gray.
- [coll-style] {number}, specifies the link's dash pattern to show the lines. For instance, [coll-style=2] shows a dotted-link
- [coll-startPos] {string}, indicates a list of corners separated by comma(,) which can be any of "TL", "TC", "TR", "ML", "MR", "BL", "BC" or "BR" of in-element, where the link can start from. For instance, [coll-startPos=TR,MR,BR] specifies that the link can start anywhere on the in-element's right-side
- [coll-endPos] {string}, indicates a list of corners separated by comma(,) which can be any of "TL", "TC", "TR", "ML", "MR", "BL", "BC" or "BR" of out-element, where the link can end into. For instance, [coll-endPos=TL,ML,BL] specifies that the link can end anywhere on the out-element's left-side
Type:
- string
Example
"" {string}, clears all the links
"L1[link=A-L]" {string}, defines a link between elements with the key "A" and "B" with the caption "L1"
"L1[link=A-L],L2[link=A-0]" {string}, defines two links, one between "A" and "L" with the caption "L1", and another between "A" and element with the index 0, with the caption "L2"
Slinks
Spools :string
The format of the property is:
"[flag=value]...[flag=value],...,[flag=value]...[flag=value]"The string representation supports the following flags:
- [key] {string}, specifies the pool's key (Key/GetKey()/SetKey(value) methods of of Pool class). For instance, [key=pool], specifies that the pool's key is "pool"
- [vis]/[hid] {number}, shows or hides the pool (Visible/GetVisible()/SetVisible(value) methods of of Pool class). For instance, [hid] or [vis=0], hides the pool, while [vis=1] shows the pool
- [dis] {number}, enables or disables the pool (Enabled/GetEnabled()/SetEnabled(value) methods of of Pool class). For instance, [dis] or [dis=0], disables the pool, while [dis=1] enables the pool
- [pos] {number}, changes the pool's position (0-based) (Position/GetPosition()/SetPosition(value) methods of of Pool class). For instance, [pos=0] indicates that the pool should be displayed first
- [client] {string}, specifies the pool's client-rectangle as a string of "x,y,width,height" type (without quotes) (Client/GetClient()/SetClient(value) methods of of Pool class). For instance, [client=0,0,128,128] specifies the pool's client are to [0,0,128,128]
- [shape] {string}, defines the shape for individual pool (Shape/GetShape()/SetShape(value) methods of of Pool class). For instance, [shape=Button] specifies that the pool is shown as a "button".
- [cursor] {string}, defines the mouse-cursor for individual pool (Cursor/GetCursor()/SetCursor(value) methods of of Pool class). For instance, [cursor=wait] indicates that the "wait" mouse-cursor is displayed while the cursor hovers the pool
- [headers] {string}, defines the headers of the pool (Headers/GetHeaders()/SetHeaders(value) methods of of Pool class).
The format of the headers is:
[headers=type[flag=value]...[flag=value],...,type[flag=value]...[flag=value]]
where:- "type", defines the type of the header, which can be any of the following:
- "left", defines the pool's header anchored to the left-side
- "top", defines the pool's header anchored to the top-side
- "right", defines the pool's header anchored to the right-side
- "bottom", defines the pool's header anchored to the right-side
- "flag", defines the property of the header such as:
- [size=value], defines the size of the header, where value is a numeric value. If 0 or negative, the header is not shown
- [shape=value], defines the shape of the header.
- "type", defines the type of the header, which can be any of the following:
- [exclhead]/[inclhead] {number}, indicates whether the pool's lanes and phases excludes or includes the pool's headers (ExcludeHeaders/GetExcludeHeaders()/SetExcludeHeaders(value) methods of of Pool class). For instance, [inclhead] or [exclhead=0], indicates that the pool's lanes and phases includes the pool's headers, while [exclhead=1] excludes the pool's headers from lanes and phases.
- [lanes] {string}, defines the lanes of the pool (the lanes goes vertically from top to bottom side of the pool) (Lanes/GetLanes()/SetLanes(value) methods of of Pool class).
The format of lanes field is:
"caption[flag=value]...[flag=value],...,caption[flag=value]...[flag=value]"
where:- "caption", defines the lane's ex-HTML caption (shown into the pool's header)
- "flag", defines a property of the lane such as:
- [size=value], defines the size of the lane (in percent), where value is a numeric value. 0 or negative value hides the lane
- [shape=value], defines the shape of the lane.
- [phases] {string}, defines the phases of the pool (the phases goes horizontally from left to right side of the pool) (Phases/GetPhases()/SetPhases(value) methods of exontrol.Swimphase.Pool).
The format of phases field is:
"caption[flag=value]...[flag=value],...,caption[flag=value]...[flag=value]"
where:- "caption", defines the phase's ex-HTML caption (shown into the pool's header)
- "flag", defines a property of the phase such as:
- [size=value], defines the size of the phase (in percent), where value is a numeric value. 0 or negative value hides the phase [shape=value], defines the shape of the phase.
Type:
- string
Example
"" {string}, clears the pools collection
"[key=pool][client=-512,-256,612,512]" {string}, creates a pool at specified location with the key "pool"
Spools
(readonly) Statistics :string
The Statistics property returns statistical information about the objects currently held by the control, such as:
Size: 588x412
Zoom: 100%
Element: 16/21
Link: 10/10
Sel: 0
Type:
- string
Example
The following statements are equivalents:
oSwimlane.GetStatistics(), gets the control's statistics data
oSwimlane.Statistics, gets the control's statistics data
where oSwimlane is an object of Swimlane type
Statistics
Tfi :string|object
The value as {string} supports any of the following keywords (each keyword can be specified using first letters only such as "b" for "bold) separated by space characters:
- bold, displays the text in bold (equivalent of <b> tag)
- italic, displays the text in italics (equivalent of <i> tag)
- underline, underlines the text (equivalent of <u> tag)
- strikeout, specifies whether the text is strike-through (equivalent of <s> tag)
- <fontName name>, specifies the font's family (equivalent of <font name> tag)
- <fontSize size>, specifies the size of the font (equivalent of <font ;size> tag)
- <fgColor CSSColor>, specifies the text's foreground color (equivalent of <fgcolor> tag)
- <bgColor CSSColor>, specifies the text's background color (equivalent of <bgcolor> tag)
- <shaColor CSSColor;width;offset>, defines the text's shadow (equivalent of <sha color;width;offset> tag)
- <outColor CSSColor>, shows the text with outlined characters (CSScolor) (equivalent of <out color> tag)
- <graColor CSSColor;mode;blend>, defines a gradient text (equivalent of <gra color;mode;blend> tag)
Any other word within the string value that's not recognized as a keyword is interpreted as:
- name of the font (not a number), specifies the font's family (equivalent of <font name> tag)
- size of the font (number), specifies the size of the font (equivalent of <font ;size> tag)
The value as {object} supports any of the following fields:
- bold {boolean}, displays the text in bold (equivalent of <b> tag)
- italic {boolean}, displays the text in italics (equivalent of <i> tag)
- underline {boolean}, underlines the text (equivalent of <u> tag)
- strikeout {boolean}, specifies whether the text is strike-through (equivalent of <s> tag)
- fontName {string}, specifies the font's family (equivalent of <font name> tag)
- fontSize {number}, specifies the size of the font (equivalent of <font ;size> tag)
- fgColor {string}, specifies the text's foreground color (CSScolor) (equivalent of <fgcolor> tag)
- bgColor {string}, specifies the text's background color (CSScolor) (equivalent of <bgcolor> tag)
- shaColor {object}, specifies an object of {color, width, offset} type that defines the text's shadow (equivalent of <sha color;width;offset> tag), where:
- outColor {string}, shows the text with outlined characters (CSScolor) (equivalent of <out color> tag)
- graColor {object}, specifies an object of {color, mode, blend} type that defines a gradient text (equivalent of <gra color;mode;blend> tag), where:
- color {string}, defines the gradient-color (CSScolor)
- mode {number}, defines the gradient direction as 0 (left-right), 1 (default, top-bottom), 2 (left-center-right), and 3 (top-center-bottom)
- blend {number}, defines the gradient blend as a value between 0 and 1
CSSColor or CSS legal color values can be specified by the following methods:
- Hexadecimal colors, is specified with: #RRGGBB, where the RR (red), GG (green) and BB (blue) hexadecimal integers specify the components of the color. All values must be between 00 and FF. For example, #0000ff value is rendered as blue, because the blue component is set to its highest value (ff) and the others are set to 00.
- Hexadecimal colors with transparency, is specified with: #RRGGBBAA, where AA (alpha) value must be between 00 and FF. For example, #0000ff80 defines a semi-transparent blue.
- RGB colors, is specified with the RGB(red, green, blue) function. Each parameter (red, green, and blue) defines the intensity of the color and can be an integer between 0 and 255. For example, rgb(0,0,255) defines the blue color.
- RGBA colors, are an extension of RGB color values with an alpha channel as RGBA(red, green, blue, alpha) function, where the alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque). For example, rgba(0,0,255,0.5) defines a semi-transparent blue.
- HSL colors, is specified with the HSL(hue, saturation, lightness) function, where hue is a degree on the color wheel (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue. saturation is a percentage value; 0% means a shade of gray and 100% is the full color. lightness is also a percentage; 0% is black, 100% is white. HSL stands for hue, saturation, and lightness - and represents a cylindrical-coordinate representation of colors. For example, hsl(240, 100%, 50%) defines the blue color.
- HSLA colors, are an extension of HSL color values with an alpha channel - which specifies the opacity of the object as HSLA(hue, saturation, lightness, alpha) function, where alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque). For example, hsla(240, 100%, 50%,0.5) defines a semi-transparent blue.
- Predefined/Cross-browser color names, 140 color names are predefined in the HTML and CSS color specification. For example, blue defines the blue color.
Type:
- string | object
Example
null {null}, the tfi field is ignored
"bold monospace 16 <fg blue>" {string}, defines Monospace font of 16px height, bold and blue
{bold: true, fontName: "monospace", fontSize: 16, fgColor: "blue"} {object}, defines Monospace font of 16px height, bold and blue
Tfi
UndoRedoQueueLength :number
-
negative {number}, the control's Undo/Redo queue is limitless
0 {number}, the control's Undo/Redo feature is disabled
positive {number}, specifies the maximum number of Undo/Redo actions that may be stored to the control's Undo/Redo queue
Type:
- number
- Since:
- 2.0
Example
-1 {number}, the Undo/Redo queue is limitless
1 {number}, the Undo/Redo queue limits the number of actions to store to 1 (one action or one block of actions)
UndoRedoQueueLength
WheelChange :number
- Setting wheelChange to 0 disables mouse wheel actions, preventing the control from changing when the wheel is scrolled
- Setting wheelChange to a positive number, such as 5, increases the control's value by that amount each time the wheel is rotated, enabling faster adjustments
By modifying this value, you can fine-tune the control's responsiveness, making it easier for users to perform precise changes or larger adjustments as needed.
Type:
- number
Example
0 {number}, locks any action the mouse's wheel performs
18 {number}, scrolls the control by 18-pixels when mouse's wheel is rotated (CTRL + wheel scrolls horizontally)
WheelChange
Zoom :number
Type:
- number
Example
null {null}, Specifies normal-view (100%)
150 {number}, Indicates that the control's label is magnfied to 150%
Zoom
ZoomLevels :string
Type:
- string
Example
null {null}, Specifies that the control's zoom factor is always 100%
150 {number}, Specifies that the control's zoom factor is always 150%
"50,100,200,350" {string}, Indicates that the zoom-factor can be any of selected values, and the margins of zoom-factor is 50% to 350%
ZoomLevels
oSV :object
Type:
- object
Example
The following statements are equivalent:
oSwimlane.oSV.GetZoom() {number}, gets the zoom factor of the control's content
oSwimlane.GetZoom() {number}, gets the zoom factor of the control's content
where oSwimlane is an object of Swimlane type
oSV
Methods
Arrange(id, oDefArrangeopt)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
id |
any | The id parameter could be any of the following:
|
|
oDefArrange |
DefArrange |
<optional> |
Indicates an object of {dir, dx, dy, align, compact} type to customize the arrangement of the elements. The dir property defines the direction of arrangement as a value of 0 (down), 1 (up), 2 (right) or 3 (left). The dx and dy properties specify the horizontal and vertical distance between the elements, respectively. The align property indicates the alignment of elements in each level of arrangement as a value of 0 (near), 1 (center) or 2 (far). The compact property specifies whether to arrange the elements in a compact style, which reduces the distance between elements if they have enough space to be arranged without overlapping. For instance, {dir: 0, dx: 20, dy: 20, align: 0, compact: true} arranges the elements in a downward direction with 20 pixels of horizontal and vertical distance, aligned to the left (near) and in a compact style. |
Example
oSwimlane.Arrange(), arranges all linked-elements of the control based on the links
Arrange
BeginUpdate()
Example
The following statements are equivalents:
oSwimlane.BeginUpdate();
// performs multiple changes to the control
oSwimlane.EndUpdate();
or
oSwimlane.Update(function()
{
// performs multiple changes to the control
});
BeginUpdate
BlockUndoRedo(callback, thisArg)
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
callback | Specifies a function of callback() type. |
thisArg |
any | Indicates the value of "this" keyword during the callback, or the control itself if missing. |
Example
The following statements are equivalents:
oSwimlane.StartBlockUndoRedo();
// multiple Undo/Redo operations to be recorded as a block
oSwimlane.EndBlockUndoRedo();
or
oSwimlane.BlockUndoRedo(function()
{
// multiple Undo/Redo operations to be recorded as a block
});
BlockUndoRedo
CanRedo() → {boolean}
- Since:
- 2.0
Returns:
- Type
- boolean
Example
false {boolean}, no Redo operation is permitted
true {boolean}, a Redo operation is available
CanRedo
CanUndo() → {boolean}
- Since:
- 2.0
Returns:
- Type
- boolean
Example
false {boolean}, no Undo operation is permitted
true {boolean}, an Undo operation is available
CanUndo
Clear()
- Since:
- 2.0
Example
oSwimlane.Clear(), clears all elements and links from the control
Clear
Copy()
- Since:
- 2.1
Example
The following samples demonstrate how to implement the Copy, Cut, and Paste methods for the control using the Clipboard API when the user presses the CTRL + C, CTRL + X (the "See text and images copied to the clipboard /Allow/Block" message may occur due security permissions):
oSwimlane.on("{CTRL + C}", oSwimlane.Copy)
oSwimlane.on("{CTRL + X}", oSwimlane.Cut)
oSwimlane.on("{CTRL + V}", oSwimlane.Paste)
Please note that the control requires focus, so CTRL + C, CTRL + X or CTRL + V to make it works. In the same manner, the tabIndex attribute must be present into the defintion of the canvas HTML element.
Copy
Cut()
- Since:
- 2.1
Example
The following samples demonstrate how to implement the Copy, Cut, and Paste methods for the control using the Clipboard API when the user presses the CTRL + C, CTRL + X (the "See text and images copied to the clipboard /Allow/Block" message may occur due security permissions):
oSwimlane.on("{CTRL + C}", oSwimlane.Copy)
oSwimlane.on("{CTRL + X}", oSwimlane.Cut)
oSwimlane.on("{CTRL + V}", oSwimlane.Paste)
Please note that the control requires focus, so CTRL + C, CTRL + X or CTRL + V to make it works. In the same manner, the tabIndex attribute must be present into the defintion of the canvas HTML element.
Cut
Element(id) → {Element}
Parameters:
| Name | Type | Description |
|---|---|---|
id |
any | The id parameter could be any of the following:
|
- Since:
- 1.1
Returns:
- Type
- Element
Example
The following statements are equivalent:
oSwimlane.Element(id) {Element}, gets the element giving its index, identifier/key or reference
oSwimlane.Elements.Item(id) {Element}, gets the element giving its index, identifier/key or reference
where oSwimlane is an object of Swimlane type
Element
EndBlockUndoRedo()
- Since:
- 2.0
Example
oSwimlane.StartBlockUndoRedo()
...
oSwimlane.EndBlockUndoRedo()
EndBlockUndoRedo
EndUpdate()
Example
The following statements are equivalents:
oSwimlane.BeginUpdate();
// performs multiple changes to the control
oSwimlane.EndUpdate();
or
oSwimlane.Update(function()
{
// performs multiple changes to the control
});
EndUpdate
EnsureVisibleClient(clientA, ensureOptsopt)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
clientA |
object | The client parameter could be any of the following:
|
|
ensureOpts |
object |
<optional> |
Specifies different options to run the current method as explained:
|
Example
oSwimlane.EnsureVisibleClient([100, 100, 50, 50]), ensures that the rectangle of [x:100,y:100,width:50,height:50] absolute-coordinates fits within the control's client area
oSwimlane.EnsureVisibleClient(oSwimlane.Element(0)), ensures that the first element of the control's layout fits within the control's client area
EnsureVisibleClient
EnsureVisibleSelection()
Example
oSwimlane.EnsureVisibleSelection(), scrolls the control's content to ensure that the control's selection fits the control's client area
EnsureVisibleSelection
GetCanvas() → {HTMLCanvasElement}
Returns:
- Type
- HTMLCanvasElement
Example
The following statement draws a filled rectangle on the control's canvas, at position (10,10) with width and height of 100px:
oSwimlane.GetCanvas().getContext("2d").fillRect(10, 10, 100, 100)
oSwimlane.oSV.GetCanvas().getContext("2d").fillRect(10, 10, 100, 100)
where oSwimlane is a reference to the Swimlane object
GetCanvas
GroupUndoRedoActions(countopt)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
count |
number |
<optional> |
Indicates the number of actions to group (if missing all actions are grouped). |
- Since:
- 2.0
Example
GroupUndoRedoActions(), groups all Undo/Redo operations into a block
GroupUndoRedoActions
Home()
Example
oSwimlane.Home(), zooms to 100% and scrolls the control to origin (0,0)
Home
Lane(id, lane) → {PoolSplitter}
Parameters:
| Name | Type | Description |
|---|---|---|
id |
any | The id parameter could be any of the following:
|
lane |
any | The lane parameter could be any of the following:
|
- Since:
- 1.8
Returns:
- Type
- PoolSplitter
Example
The following statements are equivalent:
oSwimlane.Lane(0, 0) {PoolSplitter}, gets the first lane of the first pool of the control
oSwimlane.Pool(0).Lane(0) {PoolSplitter}, gets the first lane of the first pool of the control
where oSwimlane is an object of Swimlane type
Lane
Link(id) → {Link}
Parameters:
| Name | Type | Description |
|---|---|---|
id |
any | The id parameter could be any of the following:
|
- Since:
- 1.1
Returns:
- Type
- Link
Example
The following statements are equivalent:
oSwimlane.Link(id) {Link}, gets the link giving its index, identifier/key or reference
oSwimlane.Links.Item(id) {Link}, gets the link giving its index, identifier/key or reference
where oSwimlane is an object of Swimlane type
Link
Paste()
- Since:
- 2.1
Example
The following samples demonstrate how to implement the Copy, Cut, and Paste methods for the control using the Clipboard API when the user presses the CTRL + C, CTRL + X (the "See text and images copied to the clipboard /Allow/Block" message may occur due security permissions):
oSwimlane.on("{CTRL + C}", oSwimlane.Copy)
oSwimlane.on("{CTRL + X}", oSwimlane.Cut)
oSwimlane.on("{CTRL + V}", oSwimlane.Paste)
Please note that the control requires focus, so CTRL + C, CTRL + X or CTRL + V to make it works. In the same manner, the tabIndex attribute must be present into the defintion of the canvas HTML element.
Paste
Phase(id, phase) → {PoolSplitter}
Parameters:
| Name | Type | Description |
|---|---|---|
id |
any | The id parameter could be any of the following:
|
phase |
any | The phase parameter could be any of the following:
|
- Since:
- 1.8
Returns:
- Type
- PoolSplitter
Example
The following statements are equivalent:
oSwimlane.Phase(0, 0) {PoolSplitter}, gets the first phase of the first pool of the control
oSwimlane.Pool(0).Phase(0) {PoolSplitter}, gets the first phase of the first pool of the control
where oSwimlane is an object of Swimlane type
Phase
Pool(id) → {Pool}
Parameters:
| Name | Type | Description |
|---|---|---|
id |
any | The id parameter could be any of the following:
|
- Since:
- 1.1
Returns:
- Type
- Pool
Example
The following statements are equivalent:
oSwimlane.Pool(0) {Pool}, gets the first pool of the control
oSwimlane.Pools.Item(0) {Pool}, gets the first pool of the control
where oSwimlane is an object of Swimlane type
Pool
Redo()
- Since:
- 2.0
Example
oSwimlane.Redo(), redoes the last action that was undone
Redo
RedoListAction(actionopt, countopt) → {string}
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
action |
string |
<optional> |
Specifies null(to list all Redo actions) or the mask-pattern to match the action to list. Space sparates multiple mask-pattern.
The mask-pattern supports wild characters as explained:
|
count |
number |
<optional> |
Indicates the number of Redo actions to list (if missing all Redo actions are listed). |
- Since:
- 2.0
Returns:
- Type
- string
Example
oSwimlane.RedoListAction(), lists all Redo actions that can be executed
oSwimlane.RedoListAction("*Element"), lists all "*Element" Redo actions that can be executed, such as AddElement, RemoveElement, UpdateElement or MoveElement
oSwimlane.RedoListAction("AddElement"), lists first "AddElement" Redo actions that can be executed
RedoListAction
RedoRemoveAction(actionopt, countopt)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
action |
string |
<optional> |
Specifies null(to remove all Redo actions) or the mask-pattern to match the action to remove. Space sparates multiple mask-pattern. The mask-pattern supports wild characters as explained:
|
count |
number |
<optional> |
Indicates the number of actions to remove (if missing all actions are removed) from the Redo queue. |
- Since:
- 2.0
Example
RedoRemoveAction(), removes all actions from the Redo queue
RedoRemoveAction("*Element"), removes all "*Element" actions, such as AddElement, RemoveElement, UpdateElement or MoveElement, from the Redo queue
RedoRemoveAction("AddElement"), removes the first "AddElement" Redo action from the Redo queue
RedoRemoveAction
Refresh()
For example, call Refresh() when:
- The control's container has been resized and the layout must be recalculated.
- External CSS or styling changes affect the control's appearance.
- The control becomes visible after being hidden.
- You need to ensure the UI is visually synchronized with its current internal state.
The method does not alter the control's data, options, or configuration - it only updates the rendered output.
Example
oSwimlane.Refresh(), refreshes the control
Refresh
RemoveSelection()
Example
oSwimlane.RemoveSelection(), deletes the control's selection (focus-link or the selected-elements)
RemoveSelection
SelectAll()
Example
oSwimlane.SelectAll() {void}, selects all elements within the control
oSwimlane.UnselectAll() {void}, clears the control's selection
SelectAll
Smooth(callback, thisArg)
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
callback | Indicates a callback function that generates the new layout for the control ( such as removing or adding new elements to the control). The callback is provided with no arguments. |
thisArg |
any | Specifies the value of this keyword for callback functions. If missing, the SV object reference is used instead. |
Example
The following sample demonstrates how to use the Smooth() method to perform a smooth transition, such as when adding or removing elements from the control:
oSwimlane.Smooth(function()
{
...
});
Smooth
Soom(zoomTo, oPointAbsopt, rgrOriginopt)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
zoomTo |
number | Indicates a numeric value that defines the target-zoom factor as a value between 10 and 1000 (no zoom if null or undefined). | |
oPointAbs |
object |
<optional> |
Specifies an object of {x,y} or array as [x,y] type that specifies the absolute-coordinates of the point to scroll into the client at rgrOrigin relative-position. |
rgrOrigin |
array |
<optional> |
Specifies a two-elements array of [x,y] type that specifies the ratio on x and y axis to determine the position of the oPointAbs relative to the view page. The x and y values should be value between 0 and 1. |
Example
oSwimlane.Soom(100, [0,0]), zooms to 100% and brings the origin (0,0) at its original position
oSwimlane.Soom(150, [0,0], [0,0]), zooms to 150% and brings the origin (0,0) at top-left corner
Soom
StartBlockUndoRedo()
- Since:
- 2.0
Example
oSwimlane.StartBlockUndoRedo()
...
oSwimlane.EndBlockUndoRedo()
StartBlockUndoRedo
Undo()
- Since:
- 2.0
Example
oSwimlane.Undo(), undoes the last control operation
Undo
UndoListAction(actionopt, countopt) → {string}
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
action |
string |
<optional> |
Specifies null(to list all Undo actions) or the mask-pattern to match the action to list. Space sparates multiple mask-pattern.
The mask-pattern supports wild characters as explained:
|
count |
number |
<optional> |
Indicates the number of Undo actions to list (if missing all Undo actions are listed). |
- Since:
- 2.0
Returns:
- Type
- string
Example
oSwimlane.UndoListAction(), lists all Undo actions that can be executed
oSwimlane.UndoListAction("*Element"), lists all "*Element" Undo actions that can be executed, such as AddElement, RemoveElement, UpdateElement or MoveElement.
oSwimlane.UndoListAction("AddElement",1), lists first "AddElement" Undo actions that can be executed
UndoListAction
UndoRemoveAction(actionopt, countopt)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
action |
string |
<optional> |
Specifies null(to remove all Undo actions) or the mask-pattern to match the action to remove. Space sparates multiple mask-pattern. The mask-pattern supports wild characters as explained:
|
count |
number |
<optional> |
Indicates the number of actions to remove (if missing all actions are removed) from the Undo queue. |
- Since:
- 2.0
Example
UndoRemoveAction(), removes all actions from the Undo queue
UndoRemoveAction("*Element"), removes all "*Element" actions, such as AddElement, RemoveElement, UpdateElement or MoveElement, from the Undo queue
UndoRemoveAction("AddElement"), removes the first "AddElement" Undo action from the Undo queue
UndoRemoveAction
UnselectAll()
Example
oSwimlane.SelectAll() {void}, selects all elements within the control
oSwimlane.UnselectAll() {void}, clears the control's selection
UnselectAll
Update(callback, thisArgopt)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
callback |
callback | Indicates a callback to perform changes within the control. | |
thisArg |
any |
<optional> |
Specifies the value of "this" keyword during the callback. If missing/empty/undefined the thisArg points to the control itself, as an object of Swimlane type. |
Example
The following statements are equivalents:
oSwimlane.Update(function()
{
// performs multiple changes to the control
});
or
oSwimlane.BeginUpdate();
// performs multiple changes to the control
oSwimlane.EndUpdate();
Update
feE(callback, thisArgopt)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
callback |
callback | A function of callback(oElement) type that's called for every element, where oElement is:
|
|
thisArg |
any |
<optional> |
Indicates the value of "this" keyword during the callback. If missing/empty/undefined the thisArg points to the control itself, as an object of Swimlane type. |
- Since:
- 4.0
Example
The following sample displays the caption of all elements:
oSwimlane.feE(function(oElement)
{
console.log(oElement.Caption)
})
feE
feEU(callback, thisArgopt) → {any}
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
callback |
callback | A function of callback(oElement) {any} type that's called for every element, where oElement is
|
|
thisArg |
any |
<optional> |
Indicates the value of "this" keyword during the callback. If missing/empty/undefined the thisArg points to the control itself, as an object of Tree type. |
- Since:
- 4.0
Returns:
- Type
- any
Example
The following sample displays the caption of the first non-movable element:
console.log(oSwimlane.feEU(function(oElement)
{
return !oElement.isMovable() && oElement.Caption || "";
}))
feEU
feL(callback, thisArgopt)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
callback |
callback | A function of callback(oLink) type that's called for every link, where oLink is:
|
|
thisArg |
any |
<optional> |
Indicates the value of "this" keyword during the callback. If missing/empty/undefined the thisArg points to the control itself, as an object of Swimlane type. |
- Since:
- 4.0
Example
The following sample displays the from/to of all links:
oSwimlane.feL(function(oLink)
{
console.log(oLink.From, "->", oLink.To)
})
feL
feLU(callback, thisArgopt) → {any}
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
callback |
callback | A function of callback(oLink) {any} type that's called for every link, where oLink is
|
|
thisArg |
any |
<optional> |
Indicates the value of "this" keyword during the callback. If missing/empty/undefined the thisArg points to the control itself, as an object of Tree type. |
- Since:
- 4.0
Returns:
- Type
- any
Example
The following sample displays the first hidden link:
console.log(oSwimlane.feLU(function(oLink)
{
return !oLink.isVisible() && (oLink.From + "->" + oLink.To) || "";
}))
feLU
feP(callback, thisArgopt)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
callback |
callback | A function of callback(oPool) type that's called for every pool, where oPool is:oSP
|
|
thisArg |
any |
<optional> |
Indicates the value of "this" keyword during the callback. If missing/empty/undefined the thisArg points to the control itself, as an object of Surface type. |
- Since:
- 4.0
Example
The following sample displays the client-rectangle of every pool:
oSwimlane.feP(function(oPool)
{
console.log(oPool.Client)
})
feP
fePU(callback, thisArgopt) → {any}
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
callback |
callback | A function of callback(oPool) {any} type that's called for every pool, where oPool is
|
|
thisArg |
any |
<optional> |
Indicates the value of "this" keyword during the callback. If missing/empty/undefined the thisArg points to the control itself, as an object of Tree type. |
- Since:
- 4.0
Returns:
- Type
- any
Example
The following sample displays the client-rectangle of the first disabled pool:
console.log(oSwimlane.fePU(function(oPool)
{
return !oPool.isEnabled() && oPool.Client;
}))
fePU
off(event, listener, methodopt)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
event |
string | Indicates the event to unbind, which can either be:
|
|
listener |
object | callback | Defines the listener to remove, which can either be:
|
|
method |
string |
<optional> |
Defines an optional case-sensitive string specifying the method on the listener to remove. If not provided, the listener[type]() function is used. This parameter is ignored when the listener is a JavaScript callback function. |
- Since:
- 4.4
Example
The following example removes the click event handler from the control:
oSwimlane.off("click");
where oSwimlane is an object of Swimlane type.
This sample is equivalent to:
oSwimlane.Listeners.Remove("onclick");
The following example removes all event handlers from the control:
oSwimlane.off();
where oSwimlane is an object of Swimlane type.
This sample is equivalent to:
oSwimlane.Listeners.Clear();
or
oSwimlane.Listeners.Remove();
off
on(event, listener, methodopt) → {object}
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
event |
string | Specifies the event to listen for or a keyboard shortcut, in one of the following forms:
|
|
listener |
object | callback | Defines the listener to add, which can either be:
|
|
method |
string |
<optional> |
Defines an optional case-sensitive string specifying the method on the listener to handle the event. If not provided, the listener[type]() function is used. This parameter is ignored when the listener is a JavaScript callback function. |
- Since:
- 4.4
Returns:
- type {string}, specifies a case-sensitive string that specifies the type of event to listen for
- do(event) {callback}, indicates a function that can be invoked to trigger the specified event for all listeners registered for that event type
- callback {callback}, defines the listener's callback function
- thisArg {any}, defines the value of this during the listener's callback execution
- lock {number}, locks or unlocks the invocation of the listener's callback
- name {string}, defines the name of the callback, mostly used for debugging purposes
- equal(oCompareListenerCallback) {callback}, indicates a function of callback(oCompareListenerCallback) {boolean} type compares the current object with the provided object. It returns true if the objects contain the same data
- Type
- object
Example
The following example logs event details when the control is clicked:
oSwimlane.on("click", function(oEvent)
{
console.log(oEvent);
});
where oSwimlane is an object of Swimlane type.
This sample is quivalent of
oSwimlane.Listeners.Add("onclick", function (oEvent)
{
console.log(oEvent);
});
on