ConnectionApi<T, C> extension
Connection-related operations for NodeFlowController.
This extension provides comprehensive APIs for working with connections:
Model APIs
- getConnection, connectionIds, connectionCount - Lookup operations
- addConnection, removeConnection, createConnection - CRUD operations
Query APIs
- getConnectionsForNode - Get all connections for a node
- getConnectionsFromPort, getConnectionsToPort - Port-specific queries
- getVisibleConnections, getHiddenConnections - Visibility queries
Visual Query APIs
- getConnectionBounds - Bounding box for a connection
- getConnectionPath - The rendered path for a connection
Control Point APIs
addControlPoint,updateControlPoint,removeControlPoint- CRUDclearControlPoints- Remove all control points
Selection APIs
- selectConnection, clearConnectionSelection - Selection management
- selectAllConnections - Bulk selection
Validation APIs
- on
-
- NodeFlowController<
T, C>
- NodeFlowController<
Properties
- connectionCount → int
-
Available on NodeFlowController<
Gets the total number of connections in the graph.T, C> , provided by the ConnectionApi extensionno setter -
connectionIds
→ Iterable<
String> -
Available on NodeFlowController<
Gets all connection IDs in the graph.T, C> , provided by the ConnectionApi extensionno setter
Methods
-
addConnection(
Connection< C> connection) → void -
Available on NodeFlowController<
Adds a connection between two ports.T, C> , provided by the ConnectionApi extension -
cancelConnectionDrag(
) → void -
Available on NodeFlowController<
Cancels a connection drag without creating a connection.T, C> , provided by the ConnectionApi extension -
canConnect(
{required String targetNodeId, required String targetPortId, bool skipCustomValidation = false}) → ConnectionValidationResult -
Available on NodeFlowController<
Validates whether a connection can be made from the current drag state to the specified target port.T, C> , provided by the ConnectionApi extension -
canStartConnection(
{required String nodeId, required String portId, required bool isOutput}) → ConnectionValidationResult -
Available on NodeFlowController<
Validates whether a connection can start from the specified port.T, C> , provided by the ConnectionApi extension -
clearConnectionSelection(
) → void -
Available on NodeFlowController<
Clears all connection selections.T, C> , provided by the ConnectionApi extension -
completeConnectionDrag(
{required String targetNodeId, required String targetPortId}) → Connection< C> ? -
Available on NodeFlowController<
Completes a connection drag by creating the connection.T, C> , provided by the ConnectionApi extension -
createConnection(
String sourceNodeId, String sourcePortId, String targetNodeId, String targetPortId) → void -
Available on NodeFlowController<
Creates a connection between two ports.T, C> , provided by the ConnectionApi extension -
deleteAllConnectionsForNode(
String nodeId) → void -
Available on NodeFlowController<
Deletes all connections associated with a node.T, C> , provided by the ConnectionApi extension -
getConnection(
String connectionId) → Connection< C> ? -
Available on NodeFlowController<
Gets a connection by its ID.T, C> , provided by the ConnectionApi extension -
getConnectionBounds(
String connectionId) → Rect? -
Available on NodeFlowController<
Gets the bounding rectangle for a connection.T, C> , provided by the ConnectionApi extension -
getConnectionPath(
String connectionId) → Path? -
Available on NodeFlowController<
Gets the rendered path for a connection.T, C> , provided by the ConnectionApi extension -
getConnectionsForNode(
String nodeId) → List< Connection< C> > -
Available on NodeFlowController<
Gets all connections associated with a node.T, C> , provided by the ConnectionApi extension -
getConnectionsFromPort(
String nodeId, String portId) → List< Connection< C> > -
Available on NodeFlowController<
Gets all connections originating from a specific port.T, C> , provided by the ConnectionApi extension -
getConnectionsToPort(
String nodeId, String portId) → List< Connection< C> > -
Available on NodeFlowController<
Gets all connections targeting a specific port.T, C> , provided by the ConnectionApi extension -
getCycles(
) → List< List< String> > -
Available on NodeFlowController<
Gets all cycles in the graph.T, C> , provided by the ConnectionApi extension -
getHiddenConnections(
) → List< Connection< C> > -
Available on NodeFlowController<
Gets all hidden connections in the graph.T, C> , provided by the ConnectionApi extension -
getVisibleConnections(
) → List< Connection< C> > -
Available on NodeFlowController<
Gets all visible connections in the graph.T, C> , provided by the ConnectionApi extension -
hasConnectionsForNode(
String nodeId) → bool -
Available on NodeFlowController<
Checks if a node has any connections (as source or target).T, C> , provided by the ConnectionApi extension -
hasCycles(
) → bool -
Available on NodeFlowController<
Checks if the graph contains any cycles.T, C> , provided by the ConnectionApi extension -
isConnectionSelected(
String connectionId) → bool -
Available on NodeFlowController<
Checks if a connection is currently selected.T, C> , provided by the ConnectionApi extension -
removeConnection(
String connectionId) → void -
Available on NodeFlowController<
Removes a connection from the graph.T, C> , provided by the ConnectionApi extension -
requestDeleteConnection(
String connectionId) → Future< bool> -
Available on NodeFlowController<
Requests deletion of a connection with lock check and confirmation callback.T, C> , provided by the ConnectionApi extension -
selectAllConnections(
) → void -
Available on NodeFlowController<
Selects all connections in the graph.T, C> , provided by the ConnectionApi extension -
selectConnection(
String connectionId, {bool toggle = false}) → void -
Available on NodeFlowController<
Selects a connection in the graph.T, C> , provided by the ConnectionApi extension -
startConnectionDrag(
{required String nodeId, required String portId, required bool isOutput, required Offset startPoint, required Rect nodeBounds, Offset? initialScreenPosition}) → ConnectionValidationResult -
Available on NodeFlowController<
Starts a connection drag from a port.T, C> , provided by the ConnectionApi extension -
updateConnectionDrag(
{required Offset graphPosition, String? targetNodeId, String? targetPortId, Rect? targetNodeBounds}) → void -
Available on NodeFlowController<
Updates a connection drag with the current position.T, C> , provided by the ConnectionApi extension