About BorderItemSelectionEditPolicy [message #208012] |
Wed, 08 October 2008 07:58 |
|
Hi,
I have seen that the BorderItemSelectionEditpolicy extends non resizable
policy. In my case I would like the same behavior for my ports but I would
like to add the resizable behavior.
How can I change this editpolicy?
I have tried to add ResizeHandles but It is no sufficient.
Maybe It is more interesting to inherits from SelectionHandlesEditPolicy
and add properties of BorderItemSelctionEditPolicy?
|
|
|
Re: About BorderItemSelectionEditPolicy [message #208395 is a reply to message #208012] |
Mon, 13 October 2008 08:52 |
|
Hi, I have succeed to solve this problem. To do that, I have changed and
create several classes:
- I have written BorderItemResizableEditPolicy that extends
ResizableShapeEditPolicy. In this class I have add code that comes from
BorderItemSelectionEditPolicy.
- I have also written ConstrainedItemBorderLayoutEditPolicy extends
ConstrainedLayoutEditPolicy . This class is associated to the container
element and has in charge ti add the policy BorderItemResizableEditPolicy to
his boder item child and to send resize command for his child.
-Then I changed the generated classes. I have added the
ConstrainedItemBorderLayoutEditPolicy to container element
- In my case I have also created my owned locators in order to constrain
movement of my border item
I have put some classe. This example will be seen in the code of class
diagram of Papyrus http://wiki.eclipse.org/MDT/Papyrus-Proposal . The first
commit will be soon.
Patrick
"Patrick Tessier" <Patrick.Tessier@cea.fr> a
|
|
|
Powered by
FUDForum. Page generated in 0.04089 seconds