Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Bounds / figures / compartment / visible
Bounds / figures / compartment / visible [message #190260] Fri, 30 May 2008 11:04 Go to next message
Youmm P. is currently offline Youmm P.Friend
Messages: 140
Registered: July 2009
Senior Member
Hello,

If I have several figures in a compartment, is it possible to obtain the
dimension of a rectangle that contains all the figures?

I would like to dimension a compartment so that all the contained
figures are visible. How can I do that?
Re: Bounds / figures / compartment / visible [message #190284 is a reply to message #190260] Fri, 30 May 2008 12:23 Go to previous message
Eclipse UserFriend
Originally posted by: jan.herriger.gmx.de

Hello Youmm,

maybe this helps:

Rectangle rectangle = null;
Iterator it = myEditPart.getChildren().iterator();

while (it.hasNext()) {

IFigure f = ((GraphicalEditPart)it.next()).getFigure();

rectangle = rectangle == null ?
f.getBounds().getCopy() :
rectangle.getUnion(f.getBounds());
}

Regards,
Jan


Youmm P. schrieb:
> Hello,
>
> If I have several figures in a compartment, is it possible to obtain the
> dimension of a rectangle that contains all the figures?
>
> I would like to dimension a compartment so that all the contained
> figures are visible. How can I do that?
Previous Topic:Showing progress monitor
Next Topic:How to detect when a delete request is user generated
Goto Forum:
  


Current Time: Sat Apr 27 03:52:23 GMT 2024

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

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

Back to the top