Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » resize policy
resize policy [message #640382] Sun, 21 November 2010 11:36 Go to next message
Henrik Rentz-Reichert is currently offline Henrik Rentz-ReichertFriend
Messages: 261
Registered: July 2009
Senior Member
Hi,

I have a (rectangular) shape containing (rectangular) child shapes.

I would like to implement the following resize policy:

If I use the bottom right handle I can move the handle not farther left
than the rightmost child corner and not farther up than the bottommost
child corner.
The child shapes will keep their old (relative and absolute) position.

If I use the upper left handle I can move the handle not farther right
than the leftmost child corner and not farther down than the topmost
child corner.
The child shapes will keep their old *absolute* position but the
relative position should change.

It should be obvious how the 6 other resize handles should be treated.


Can the ResizeFeature distinguish those situations?
How can the LayoutFeature determine whether relative positions have to
be adjusted?

Thanks,
Henrik
Re: resize policy [message #641629 is a reply to message #640382] Fri, 26 November 2010 11:50 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hi Henrik,

this should be possible by comparing the new x- and y-coordinates with the
old coordinates from the root GA on the diagram. If they differ the upper
left corner has been moved (or if only one of the values changed one of the
other upper or left handles was used).

Nevertheless, I didn't try to implement something like that and the details
might be nasty... Please let me know if that works.

Michael


"Henrik Rentz-Reichert" <hrr@protos.de> wrote in message
news:icavvv$ap3$1@news.eclipse.org...
> Hi,
>
> I have a (rectangular) shape containing (rectangular) child shapes.
>
> I would like to implement the following resize policy:
>
> If I use the bottom right handle I can move the handle not farther left
> than the rightmost child corner and not farther up than the bottommost
> child corner.
> The child shapes will keep their old (relative and absolute) position.
>
> If I use the upper left handle I can move the handle not farther right
> than the leftmost child corner and not farther down than the topmost
> child corner.
> The child shapes will keep their old *absolute* position but the
> relative position should change.
>
> It should be obvious how the 6 other resize handles should be treated.
>
>
> Can the ResizeFeature distinguish those situations?
> How can the LayoutFeature determine whether relative positions have to
> be adjusted?
>
> Thanks,
> Henrik
Previous Topic:Graphiti as Part of Modeling Discovery
Next Topic:inconsistency in position of IMoveContext and ICreateContext
Goto Forum:
  


Current Time: Fri Apr 19 12:28:02 GMT 2024

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

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

Back to the top