Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Resize and Children
Resize and Children [message #188142] Tue, 19 July 2005 11:21 Go to next message
Eclipse UserFriend
Originally posted by: sidney.lee.ibs.net

Hi!

When a child is resized, I would like to resize siblings to prevent
overlapping. So, with that in mind, when/where should the resize of
siblings be handled, i.e.
(i) would it be corect to use
getResizeChildrenCommand(ChangeBoundsRequest) of the parent
XYLayoutEditPolicy? The problem is (though any sibling which needs to be
resized could be determined) the request relates to the original child
being resized and hence, a new ChangeBoundsRequest for each sibling -
would that be a problem to create on the fly?
(iii) I assume if I need to abort the child resize where any attempt to
resize a sibling fails (minimum size, etc.), the
getResizeChildrenCommand(ChangeBoundsRequest) mentioned above could
return *null*?

Any help would be greatly appreciated!

Thanks, Sidney
Re: Resize and Children [message #188214 is a reply to message #188142] Tue, 19 July 2005 15:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.unknown.com

Your parent container must have some sort of a special layout -- like flow
or toolbar. You can resize just that one child, and the container's layout
manager should update the others automatically.

"Sidney Lee" <sidney.lee@ibs.net> wrote in message
news:dbinku$8qv$1@news.eclipse.org...
> Hi!
>
> When a child is resized, I would like to resize siblings to prevent
> overlapping. So, with that in mind, when/where should the resize of
> siblings be handled, i.e.
> (i) would it be corect to use
> getResizeChildrenCommand(ChangeBoundsRequest) of the parent
> XYLayoutEditPolicy? The problem is (though any sibling which needs to be
> resized could be determined) the request relates to the original child
> being resized and hence, a new ChangeBoundsRequest for each sibling -
> would that be a problem to create on the fly?
> (iii) I assume if I need to abort the child resize where any attempt to
> resize a sibling fails (minimum size, etc.), the
> getResizeChildrenCommand(ChangeBoundsRequest) mentioned above could
> return *null*?
>
> Any help would be greatly appreciated!
>
> Thanks, Sidney
Re: Resize and Children [message #188746 is a reply to message #188214] Fri, 22 July 2005 15:08 Go to previous message
Eclipse UserFriend
Originally posted by: sidney.lee.ibs.net

Hi Pratik!

I can't use these special layouts as they do not facilitate the result
I'm looking for... basically I would like to adjust the constraints of
siblings after a component has been resized or deleted. For *resize*, I
have implemented getResizeChildrenCommand(ChangeBoundsRequest) in my
XYLayoutEditPolicy - which works perfectly. Now I would like to do the
same for *delete* using getDeleteDependantCommand(Request) since,
according to the documentation for ConstrainedLayoutEditPolicy and
REQ_DELETE_DEPENDANT, "complex layouts may decide to adjust the
constraints of the remaining children".
- My problem is that I can't seem to get a REQ_DELETE_DEPENDANT when
I delete a component and seem only to be able to delete anything if I
have a ComponetEdiPolicy implement createDeleteCommand and have it
installed for the COMPONENT_ROLE.

Any suggestion?

Many Thanks as always!


Pratik Shah wrote:
> Your parent container must have some sort of a special layout -- like flow
> or toolbar. You can resize just that one child, and the container's layout
> manager should update the others automatically.
>
> "Sidney Lee" <sidney.lee@ibs.net> wrote in message
> news:dbinku$8qv$1@news.eclipse.org...
>
>>Hi!
>>
>>When a child is resized, I would like to resize siblings to prevent
>>overlapping. So, with that in mind, when/where should the resize of
>>siblings be handled, i.e.
>>(i) would it be corect to use
>>getResizeChildrenCommand(ChangeBoundsRequest) of the parent
>>XYLayoutEditPolicy? The problem is (though any sibling which needs to be
>>resized could be determined) the request relates to the original child
>>being resized and hence, a new ChangeBoundsRequest for each sibling -
>>would that be a problem to create on the fly?
>>(iii) I assume if I need to abort the child resize where any attempt to
>>resize a sibling fails (minimum size, etc.), the
>>getResizeChildrenCommand(ChangeBoundsRequest) mentioned above could
>>return *null*?
>>
>>Any help would be greatly appreciated!
>>
>>Thanks, Sidney
>
>
>
Previous Topic:how do i create a selectable anchor?
Next Topic:Making Connections
Goto Forum:
  


Current Time: Fri Apr 26 07:00:17 GMT 2024

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

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

Back to the top