Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to center EditParts in DiagramEditor ?(I have a DiagramEditor (extends DiagramDocumentEditor) an I want to center the EditParts in it.)
How to center EditParts in DiagramEditor ? [message #528461] Tue, 20 April 2010 15:30
Andreas is currently offline AndreasFriend
Messages: 9
Registered: February 2010
Location: Germany/Berlin
Junior Member
I have a DiagramEditor (which extends DiagramDocumentEditor) an I want to center the EditParts in it. What I need is to get the size or bounds of the "EditorArea".

In 'createPartControl(Composite parent)' I try to get the size of the DiagramEditPart:

DiagramEditPart diagramEditPart =  this.getDiagramEditPart();
diagramEditPart .getFigure().getSize();

Returns the size of the bounding box of all EditParts in the DiagramEditor. The Viewport size (diagramEditPart.getViewport()) is not set yet. PreferredSize is the same like 'diagramEditPart .getFigure().getSize()'

Any suggestions?
Thank You!


I have post this question in the GEF section already. Perhaps the admin can delete it there.
Previous Topic:Connection order
Next Topic:SharedEditingDomain for an abstract class?
Goto Forum:
  


Current Time: Sat Sep 26 22:43:49 GMT 2020

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

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

Back to the top