This class is used by HierarchicLayoutCore during the various phases and models a swimlane structure.
Remarks
For layout orientation TOP_TO_BOTTOM, swimlanes partition the drawing area into vertical stripes. Each node is placed within a user-specified lane. Swimlanes are, for example, often used in flow diagrams to separate logical units.
Each node should be associated with a SwimLaneDescriptor instance; nodes in the same lane may share one instance. The results of the calculation of the swimlanes' geometry will be stored by the instances after the layout.
A SwimlaneDescriptor instance can be bound to the layout algorithm using a IDataProvider registered with the graph using key SWIMLANE_DESCRIPTOR_DP_KEY that returns a SwimlaneDescriptor instance for each node of the graph.
Default Values of Properties
indexFixed | true | The index of the swimlane will not be determined automatically. |
laneTightness | 0.0d | Swimlane will not be compressed. |
leftLaneInset | 0.0d | |
minimumLaneWidth | 0.0d | |
rightLaneInset | 0.0d |
Type Details
- yfiles module
- layout-hierarchic
- yfiles-umd modules
- layout-familytree, layout-hierarchic, layout-radial, layout
- Legacy UMD name
- yfiles.hierarchic.SwimlaneDescriptor
See Also
Constructors
Creates a new SwimlaneDescriptor instance with a given client Object and a given IComparer<T>.
Remarks
Parameters
A map of options to pass to the method.
- clientObject - Object
- a client Object used for sorting the lanes
- comparer - IComparer<Object>
- a IComparer<T> used for comparing the client objects
Throws
- Exception({ name: 'ArgumentError' })
- if the specified client Object is
null
or the specified IComparer<T> isnull
but the specified client Object is not an instance of IComparable.
Properties
Gets or sets the client object.
Remarks
Throws
- Exception({ name: 'ArgumentError' })
- if there is currently no
and the specified object is not a instance or if the given client object is null
See Also
Gets or sets the IComparer<T> instance used for sorting the lanes.
Throws
- Exception({ name: 'ArgumentError' })
- if the specified
is null
.
Gets or sets whether or not an index of a swimlane is fixed (based on the result of the comparison with the other swimlanes) or whether the index should be chosen automatically in order to minimize edge lengths.
Remarks
true
, the relative ordering given by the client objects is preserved. The remaining swimlanes may be sorted again so that the overall edge lengths are minimized.Default Value
true
.The index of the swimlane will not be determined automatically.
Gets or sets the tightness factor of the lane.
Remarks
This value should lie within [0,1]
interval.
The greater the value, the more will the lane be forced to obtain its minimum possible width.
- A value of
0.0d
will disable compression of the lane. - A value of
1.0d
will try to force the lane to obtain its minimum width.
Default Value
0.0d
.Swimlane will not be compressed.
Throws
- Exception({ name: 'ArgumentError' })
- if the tightness value is outside
[0,1]
interval
Gets or sets the left insets of the swimlane in which no element will lie in the resulting layout.
Remarks
Default Value
0.0d
.Throws
- Exception({ name: 'ArgumentError' })
- if the specified value is less than
0
.
Sample Graphs
Gets or sets the minimum width of the swimlane.
Remarks
Default Value
0.0d
.Throws
- Exception({ name: 'ArgumentError' })
- if the specified value negative
Sample Graphs
Gets or sets the right insets of the swimlane in which no element will lie in the resulting layout.
Remarks
Default Value
0.0d
.Throws
- Exception({ name: 'ArgumentError' })
- if the specified value is less than
0
.
Sample Graphs
Methods
Implements the IComparable interface using the comparer and clientObject fields.
Parameters
A map of options to pass to the method.
- o - Object
- The object to compare this to.
Returns
- ↪number
- -1: this is less than
obj
- 0: this is equal to
obj
- 1: this is greater than
obj
- -1: this is less than