Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » About BorderItemSelectionEditPolicy
About BorderItemSelectionEditPolicy [message #208012] Wed, 08 October 2008 07:58 Go to next message
Patrick Tessier is currently offline Patrick TessierFriend
Messages: 341
Registered: July 2009
Location: Paris Saclay, France
Senior Member
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 Go to previous message
Patrick Tessier is currently offline Patrick TessierFriend
Messages: 341
Registered: July 2009
Location: Paris Saclay, France
Senior Member
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
Previous Topic:how to make GMF able to see the difference between association and aggregation from xsd.
Next Topic:modifiying a diagram
Goto Forum:
  


Current Time: Wed Apr 24 14:38:31 GMT 2024

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

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

Back to the top