In this design each swimlane is implemented by a Group. Each Group has its own Group.layout, which in this case is a LayeredDigraphLayout. The Diagram.layout is a custom GridLayout that arranges all of the swimlanes (i.e. the top-level Groups) in a vertical stack.

When dragging nodes note that the nodes are limited to stay within the swimlanes. This is implemented by a custom Part.dragComputation function, here named stayInGroup.

The Groups/lanes are selectable but not movable or copyable. When a Group is selected, its custom Part.resizeAdornmentTemplate gives it a broad resize handle at the bottom of the Group and a broad resize handle at the right side of the Group. This allows the user to resize the "breadth" of the selected lane as well as the "length" of all of the lanes. However, the custom ResizingTool prevents the lane from being too narrow to hold the Group.placeholder that represents the subgraph, and it prevents the lane from being too short to hold any of the contents of the lanes. Each Group/lane is also has a GraphObject.minSize to keep it from being too narrow even if there are no member Parts at all.

You can change this sample to have its swim lanes be vertically oriented by setting:
  var HORIZONTAL = false;
Note that this change can only be done at Diagram initialization time, because the definitions of the templates depend on that variable.