Group$Typings extension

on

Properties

computesBoundsAfterDrag bool
Gets or sets whether the size of the area of the Group's #placeholder should remain the same during a DraggingTool move until a drop occurs. Groups within temporary layers (such as new Groups during a drag-copy) are unaffected by this property.
getter/setter pair
Gets or sets whether a #placeholder's bounds includes the bounds of member Links. The default value is true. If this is false, only non-Link member Parts are used to compute the Placeholder's bounds in document coordinates.
getter/setter pair
computesBoundsIncludingLocation bool
Gets or sets whether a #placeholder's bounds includes the previous Group.location. The default value is false.
getter/setter pair
handlesDragDropForMembers bool
Gets or sets whether drag-and-drop events may be bubbled up to this Group if not handled by member Parts. The default value is false -- each Node or Link that is a member of the Group needs to define its own GraphObject#mouseDragEnter, GraphObject#mouseDragLeave, and GraphObject#mouseDrop event handlers if you want dragging/dropping on a member part to act as if the user were acting on the group.
getter/setter pair
isSubGraphExpanded bool
Gets or sets whether the subgraph contained by this group is expanded. Changing this property's value will call #collapseSubGraph or #expandSubGraph, and also will call the value of #subGraphExpandedChanged if it is a function.
getter/setter pair
layout Layout?
Gets or sets the Layout used to position all of the immediate member nodes and links in this group. By default this property is an instance of Layout -- no special layout is used, which just makes sure each member node has a valid location.
getter/setter pair
memberAdded ↔ (void Function(Group, Part)?)
Gets or sets the function that is called after a member Part has been added to this Group. It is typically used to modify the appearance of the group. The first argument will be this Group. The second argument will be a Part, typically a Node, but may be a simple Part or a Link.
getter/setter pair
memberParts Iterator<Part>
This read-only property returns an iterator over the member Parts of this Group. Setting Part#containingGroup to refer to this Group will add that part to this collection. The Parts can be Nodes, Links, Groups, or simple Parts.
getter/setter pair
memberRemoved ↔ (void Function(Group, Part)?)
Gets or sets the function that is called after a member Part has been removed from this Group. It is typically used to modify the appearance of the group. The first argument will be this Group. The second argument will be a Part, typically a Node, but may be a simple Part or a Link.
getter/setter pair
memberValidation ↔ (bool Function(Group, Part)?)
Gets or sets the predicate that determines whether or not a Part may become a member of this group. If this is non-null, the predicate is called in addition to any CommandHandler#memberValidation predicate.
getter/setter pair
placeholder Placeholder?
This read-only property returns a Placeholder that this group may contain in its visual tree.
getter/setter pair
subGraphExpandedChanged ↔ (void Function(Group)?)
Gets or sets the function that is called when #isSubGraphExpanded has changed value. The argument to that function will be this Group.
getter/setter pair
ungroupable bool
Gets or sets whether the user may ungroup this group. The initial value is false.
getter/setter pair
wasSubGraphExpanded bool
Gets or sets whether the subgraph starting at this group had been collapsed by a call to #expandSubGraph on the containing Group. The initial value is false.
getter/setter pair

Methods

addMembers(Iterable<Part> coll, [bool? check]) bool
Add the Parts in the given collection as members of this Group for those Parts for which CommandHandler#isValidMember returns true. If the check argument to this method is not supplied or false, this will set Part#containingGroup on each part unconditionally, not calling CommandHandler#isValidMember.
canAddMembers(Iterable<Part> coll) bool
See if the given collection of Parts contains non-Links all for which CommandHandler#isValidMember returns true.
canUngroup() bool
This predicate returns true if #ungroupable is true, if the layer's Layer#allowUngroup is true, and if the diagram's Diagram#allowUngroup is true.
collapseSubGraph() → void
Hide each of the member nodes and links of this group, and recursively collapse any member groups. This changes the value of Part#isVisible of the whole subgraph and the parts owned by those member nodes and links. However, this group's visibility is unchanged.
expandSubGraph() → void
Show each member node and link, and perhaps recursively expand nested subgraphs. This may change the value of Part#isVisible of the whole subgraph and the parts owned by those member nodes and links. However, this group's visibility is unchanged.
findExternalLinksConnected() Iterator<Link>
Returns an iterator over all of the Links that connect with this group or any node contained by this group, in either direction, but that are not internal to this group.
findExternalNodesConnected() Iterator<Node>
Returns an iterator over all of the Nodes that are connected with this group or any node contained by this group, by a link in either direction, but that are not internal to this group.
findSubGraphParts() Set<Part>
Return a collection of Parts that are all of the nodes and links that are members of this group, including inside nested groups and label nodes, but excluding this group itself.
move(Point newpos, [bool? useLocation]) → void
Move this Group and all of its member parts, recursively.