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 05:58
Andreas is currently offline Andreas
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 Apr 24 01:48:45 EDT 2014

Powered by FUDForum. Page generated in 0.24260 seconds