Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Autosize figure programmatically
Autosize figure programmatically [message #185662] Tue, 06 May 2008 18:27
Eclipse UserFriend
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
Previous Topic:Changing default values
Next Topic:Yet another OCL problem: Who to get User OCL
Goto Forum:
  


Current Time: Tue Apr 23 12:12:23 GMT 2024

Powered by FUDForum. Page generated in 0.03147 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top