Search this API

y.layout.tree
Interface PortAssignment

All Known Implementing Classes:
DefaultPortAssignment

public interface PortAssignment

This interface is used by GenericTreeLayouter. Classes implementing this interface are responsible for the assignment of the edges' ports. NodePlacer instances will have to obey the currently set ports.


Method Summary
 void assignPorts(LayoutGraph graph, Node node)
          Called by GenericTreeLayouter before the actual layout of the graph takes place.
 

Method Detail

assignPorts

void assignPorts(LayoutGraph graph,
                 Node node)
Called by GenericTreeLayouter before the actual layout of the graph takes place. This method assigns both the single incoming edge's target port as well as all source ports for all outgoing child edges. Note that at the time this method gets invoked, GenericTreeLayouter may have reversed some edges in order to normalize the tree structure.

Parameters:
graph - the graph instance the node is part of
node - the node whose adjacent edges' ports should be set

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