Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Auto-positioning EditParts
Auto-positioning EditParts [message #191644] Wed, 10 August 2005 17:41
Eclipse UserFriend
Originally posted by: bob.donovan.ugs.com

Hi,

I have a command that shows the children of an EditPart. The children
can be quite many. I would like to be able to position the children
Edit Parts in a free space in the editor window and all in a row,
equally spaced.

Currently, my action is calculating an estimated position and width,
sending that to the command, which executes. Following the event model,
the EditPartFactory creates the corresponding EditParts.

Now the new EditParts are differnt sizes depending upon the contents.
So my figures are not spaced correctly and located in free spots in the
diagram.

How do you suggest I handle this. Two thoughts come to mind..
1) After the action is completed (commands completed too), I retrieve
the new edit parts, and send another command to reposition them based
on thier actual sizes.

2) IS there a way to figure out what the "projected" size of an
EditPart will be up front in the action.

Thanks for any input? Has anyone solved this before?
Bob
Previous Topic:Commands in the GEF text editing sample are not redoable
Next Topic:Model child, child editpart and child figure best practice
Goto Forum:
  


Current Time: Wed Sep 25 03:47:26 GMT 2024

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

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

Back to the top