Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to center EditParts in DiagramEditor ?(I have a DiagramEditor (extends DiagramDocumentEditor) an I want to center the EditParts in it.)
icon9.gif  How to center EditParts in DiagramEditor ? [message #527161] Wed, 14 April 2010 09:58
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!
Previous Topic: zoombar for ScalableFreeformRootEditPart
Next Topic:rotate a Wrappinglabel icon
Goto Forum:
  


Current Time: Thu Dec 18 10:37:18 GMT 2014

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

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