Auto-positioning EditParts [message #191644] |
Wed, 10 August 2005 17:41 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02849 seconds