|| | |||Browse by category|
How to avoid the node's size from changing after applying a graph layout algorithm?
JViews layout algorithms never modify the size (width and height) of the nodes. If the node size **appears** to be changed after a layout, this is only because in the demo, or in Composer, there is a change of the transformer after the layout. Typically, after the layout the application may want to perform a "fit to view" to make the entire graph visible.
To get unmodified node sizes after layout, simple removing the code lines that change the transformer (typically,
managerView.fitTransformerToContent()), or deselect the option in Composer (see menu Tools -> Options -> Graph Layout -> Fit to view after layout).