Bug 314819 - Make some methods of GraphContainer public so that it can be extended.
Summary: Make some methods of GraphContainer public so that it can be extended.
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy Zest (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-28 04:42 EDT by Paul Richardson CLA
Modified: 2010-06-24 17:22 EDT (History)
1 user (show)

See Also:


Attachments
patch from git repository for zest.core (5.51 KB, patch)
2010-05-28 04:42 EDT, Paul Richardson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Richardson CLA 2010-05-28 04:42:06 EDT
Created attachment 170310 [details]
patch from git repository for zest.core

We have made use of GraphContainer for displaying composite nodes in our graphs. However, certain functions of the current implementation, most specifically moving nodes when expanding a composite, are not suitable for our use hence we have extended the class to our own ends.

This has involved the following changes:

* Make pack public so it can be overrided and avoid moving nodes up/down

* Make moveNodesUp and moveNodesDown public so they can be overridden

* isExpanded getter so other components know when node is open/closed

* Since getScale() is not supported in AspectRatioFreeformLayer, changes
  getScale() to getScaleWidth() and getScaleHeight(). Likewise, for setScale.

* computerContainerSize() assumes childAreaHeight remains the same. If the
  container height is altered then it cannot be reduced. Change ensures that
  it has a minimum height but allows for the height to be reduced.

* refreshLocation() is called after the size of the container has been set,
  which potentially puts the size of the GraphContainer out of sync with the
  size of the figure. This causes problems with resizing. Thus, fix to set the
  size of the GraphContainer to match the figure.

Couple of other fixes have been added to the patch too. These have been implemented in our internal project. More consideration may be required if other contributors find them problematic.

Patch has been attached.

Thanks

phantomjinx