new LaneOptions()
The LaneOptions class encapsulates all configurable options for a lane. A lane is a horizontal section within a pool that can be used to group elements. The OnCreateLane(oLaneOpts) method lets you customize a lane's options when it is created via drag-and-drop. Its oLaneOpts parameter is an instance of LaneOptions, which allows you to set the lane's caption and shape after creation. The pool, size, index, and lanes fields of LaneOptions are read-only. The caption, size (in pixels), and shape (which can be a CSS color, a predefined shape, or an object defining shapes for different states) can be set to customize the lane's appearance.
- Since:
- 5.2
Members
(static, readonly) index :number
The index field represents the lane's position within its parent pool as a zero-based number. It indicates the lane's order in the pool's lanes collection, with the first lane having an index of 0. For example, in a pool containing three lanes, the lanes will have indices 0, 1, and 2, respectively. The index field is read-only and cannot be changed directly. It is primarily used to identify the lane's position within the pool and to access the lane via the pool's lanes collection.
Type:
- number
Example
oLaneOpts.index {number}, gets the index of the lane within the pool
(static, readonly) lanes :PoolSplitters
The lanes field represents the collection of lanes within a pool and is read-only. A pool can contain one or more lanes, each represented as an object with its own set of options, such as caption, size, and shape. The lanes field allows you to access all lanes that belong to the pool, including the lane currently being created. You can use it to retrieve information about existing lanes and manage their properties collectively. Each lane in the lanes collection has an index field that indicates its position within the pool, starting from 0 for the first lane.
Type:
Example
oLaneOpts.lanes.content {string}, gets the string-representation of the pool's lanes (including the current lane)
(static, readonly) pool :Pool
The pool field identifies the pool that owns the lane, represented as a Pool object. Each pool can contain one or more lanes. The lanes field lists all lanes that belong to the pool, while the index field specifies the position of this lane within the pool's lanes collection. You can use the pool field to access the parent pool of the lane and retrieve its properties, such as the client rectangle, headers, and other pool-specific settings. The pool field is read-only and cannot be modified directly.
Type:
Example
oLaneOpts.pool.Key {any}, gets the key of the pool that owns the lane
(static) caption :string
The caption field specifies the ex-HTML caption of the lane. It can be set after the lane is created via drag-and-drop. This field accepts plain text, ex-HTML tags for formatting (for example, <b> for bold), and even image references using <img> tags. The caption appears in the pool's header area corresponding to the lane. For instance, setting caption to "Lane 1" will display Lane 1 as the lane's header text. The caption field is a string and can be customized to provide meaningful labels for each lane within the pool.
Type:
- string
Example
"New Lane" {string}, sets the caption of the lane to "New Lane"
caption
(static) shape :any
The shape field specifies the shape to be applied on the lane being created by drag and drop.
The shape can be any of the following:
- {null}, no custom-shape is applied
- the shape's name within the exontrol.Shapes.Swimlane or exontrol.Shapes namespace
- a CSS color
- a JSON string-representation of an object of exontrol.Def.Shape type
- an object of {normal,hover,click,disabled} type. The normal, hover, click and disabled are objects of exontrol.Def.Shape type
If no shape is specified, the Shapes property defines the visual appearance of the pool's parts:
- "lane", defines the visual-appearance of all lanes for all pools
- "laneAlt", defines the visual-appearance of alternate lanes for all pools
Type:
- any
Example
"red" {string}, sets the shape of the lane to red color
"FrameSel" {string}, sets the shape of the lane to "FrameSel"
shape
(static) size :number
The size field indicates the size (in pixels) of the lane or null if the [size] flag is missing. The size field is read-only. The size of a lane determines how much vertical space its header occupies within the pool. If the size is set to a positive number, it specifies the fixed width of the lane in pixels. If the size is null, it means that the lane's size is determined by the remaining space in the pool after accounting for other lanes and headers. A size of 0 or a negative value will hide the lane.
Type:
- number
Example
0 {number}, hides the lane
24 {number}, sets the lane's header height to 24 pixels
size