Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Resizable content in Compartment with ListLayout set to true
Resizable content in Compartment with ListLayout set to true [message #758752] Thu, 24 November 2011 13:36 Go to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi all,

I try to do something like swimlanes in a pool which can be resized. In order to reach this I added a ResizableShapeEditPolicy to the contained element. This makes it showing resize handles.

installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableShapeEditPolicy());


In the EditPolicy of the containing compartment I did override the getCommand method with this:

if (request instanceof ChangeBoundsRequest){
ChangeBoundsRequest req = (ChangeBoundsRequest)request;
ContainedEditPart part = (ContainedEditPart)req.getEditParts().get(0);

Dimension newSize = model.getSize();
newSize.height = newSize.height + req.getSizeDelta().height;
newSize.height = newSize.width + req.getSizeDelta().width;
			
SetBoundsCommand sbc = new SetBoundsCommand(model.getEditingDomain(), "Resize Containee", new EObjectAdapter((View)part.getModel()), newSize);
return new ICommandProxy(sbc);


This executes but the contained editpart is not horizontally stretching and resized to a very small size. No matter how huge I resize it.

Thanks,

Ralph
Re: Resizable content in Compartment with ListLayout set to true [message #1021143 is a reply to message #758752] Tue, 19 March 2013 15:15 Go to previous message
bradai hazem is currently offline bradai hazemFriend
Messages: 20
Registered: March 2013
Junior Member
There is a solution ? I have the same problem..
Previous Topic:How to modeling this simple system - course/students/connection between students
Next Topic:GMF Filter Node
Goto Forum:
  


Current Time: Tue Mar 19 07:17:34 GMT 2024

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

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

Back to the top