Autosize figure programmatically [message #185662] |
Tue, 06 May 2008 14:27 |
Eclipse User |
|
|
|
Originally posted by: xiaojun.zhang.morganstanley.com
Hi,
When GMF editor loads a digram, i want to change a figure size to default
value whatever its original size is. In xmi format, i found the size is
stored as below:
<layoutConstraint xmi:type="notation:Bounds"
xmi:id="_NEcHEhr2Ed2QyIQ4rSrOcQ" x="67" y="45" width="217" height="289"/>
i overwrote the setLayoutConstraint method in XXXEditPart.java
@Override
public void setLayoutConstraint(EditPart child, IFigure childFigure,
Object constraint) {
getContentPaneFor((IGraphicalEditPart) child).setConstraint(
childFigure, new Rectangle(40,40,-1,-1));
}
But it doesn't work. Anybody can help? Thanks
Xiaojun
|
|
|
Powered by
FUDForum. Page generated in 0.07940 seconds