Design Question [message #197835] |
Wed, 05 October 2005 14:49  |
Eclipse User |
|
|
|
My diagrams have nodes in them that can be manually or automatically (based
on their content) sized. Many of my commands trigger a resizing of related
nodes as a side effect; even for manually sized nodes this is necessary
sometimes, otherwise they would look too bad.
The problem is that I am not sure where to place the resizing logic. If I
put it into my NodeEditPart, everything is resized just fine, but there is
no undo available for the manually sized nodes. If I put it into a separate
command, I get undo functionaliy, but then the command needs to get the
LayoutManager from the Figure of the node's NodeEditPart in order to
calculate the proper size. It is possible to do that, but I would rather not
deal with EditParts in my commands.
Does anybody have an idea how to resolve this?
|
|
|
Re: Design Question [message #197852 is a reply to message #197835] |
Wed, 05 October 2005 15:32  |
Eclipse User |
|
|
|
Well, you guys were too slow, I figured it out for myself ;)
"Felix L J Mayer" <felix.mayer@objectaid.com> wrote in message
news:di176u$mnu$1@news.eclipse.org...
> My diagrams have nodes in them that can be manually or automatically
> (based on their content) sized. Many of my commands trigger a resizing of
> related nodes as a side effect; even for manually sized nodes this is
> necessary sometimes, otherwise they would look too bad.
>
> The problem is that I am not sure where to place the resizing logic. If I
> put it into my NodeEditPart, everything is resized just fine, but there is
> no undo available for the manually sized nodes. If I put it into a
> separate command, I get undo functionaliy, but then the command needs to
> get the LayoutManager from the Figure of the node's NodeEditPart in order
> to calculate the proper size. It is possible to do that, but I would
> rather not deal with EditParts in my commands.
>
> Does anybody have an idea how to resolve this?
>
|
|
|
Powered by
FUDForum. Page generated in 0.09104 seconds