Search this API

y.layout.tree
Interface PortAssignment

All Known Implementing Classes:
DefaultPortAssignment

public interface PortAssignment

A PortAssignment places the ports of edges connecting to the same node.

Classes implementing this interface are responsible for the assignment of the edges' ports. NodePlacer instances need to obey the currently set ports.

 

Method Summary
 void assignPorts(LayoutGraph graph, Node node)
          Places the ports of edges connecting to the given node.
 

Method Detail

assignPorts

void assignPorts(LayoutGraph graph,
                 Node node)
Places the ports of edges connecting to the given node.

This method is called by GenericTreeLayouter before the actual layout calculation takes place. It assigns both the single incoming edge's target port as well as all source ports of all outgoing child edges.

 
At the time this method gets invoked, GenericTreeLayouter may have reversed some edges in order to normalize the tree structure.
Parameters:
graph - the graph
node - the node whose adjacent edges' ports should be set

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.