Bug 216687 - TreeLayout support for fixed node layout on unconstrained canvas size
Summary: TreeLayout support for fixed node layout on unconstrained canvas size
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy Zest (show other bugs)
Version: 3.4   Edit
Hardware: All Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-26 21:45 EST by Miles Parker CLA
Modified: 2015-01-22 02:44 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miles Parker CLA 2008-01-26 21:45:35 EST
Currently, when laying out nodes under any settings, the TreeLayoutAlgorithm determines node size and layout based on a pre-determined fixed canvas size. It would be very helpful to have tree layout determine ideal size given ideal node size and separation and determine canvas size from that.

Workaround:

Override TreeLayout with:

					protected void preLayoutAlgorithm(InternalNode[] entitiesToLayout,
							InternalRelationship[] relationshipsToConsider, double x, double y, double width,
							double height) {
						int maxDepth = contentProvider.getMaxDepth();
						int attributeCount = contentProvider.getAttributeCount();
						super.preLayoutAlgorithm(entitiesToLayout, relationshipsToConsider, x, y,
								attributeCount * m, [maxDepth] * n);
					}

But it is difficult to determine max Depth and results are inconsistent.

Build ID: I20071213-1700

Zest: 1.0.0v20071218
Comment 1 Miles Parker CLA 2009-09-24 22:40:48 EDT
I just wanted to see if there was any additional ideas about this. In particular, can you think of a good way to sort of fake it that wouldn't require essentially mimicking the layout algorithms themselves?
Comment 2 Alexander Nyßen CLA 2015-01-22 02:44:00 EST
Re-assigning back to inbox, as Ian is no longer active committer.