Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Design Question
Design Question [message #197835] Wed, 05 October 2005 18:49 Go to next message
Felix L J Mayer is currently offline Felix L J MayerFriend
Messages: 202
Registered: July 2009
Senior Member
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 19:32 Go to previous message
Felix L J Mayer is currently offline Felix L J MayerFriend
Messages: 202
Registered: July 2009
Senior Member
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?
>
Previous Topic:Custom Grid Layer
Next Topic:NullPointerException in palette
Goto Forum:
  


Current Time: Thu Apr 25 16:02:51 GMT 2024

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

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

Back to the top