Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Programmatically resizing an element
Programmatically resizing an element [message #228680] Thu, 04 January 2007 15:58
Eclipse UserFriend
Originally posted by:

Hi there,

i want to programmatically resize an editpart out of another editpart.
So, what i do, is creating a ChangeBoundsRequest:

ChangeBoundsRequest cbr = new ChangeBoundsRequest();
cbr.setLocation(new Point(0, 0));
cbr.setSizeDelta(new Dimension(200, 200));

Afterwards, i call

Command resize = this.getParent().getParent().getCommand(cbr);

Here i try to get the command out of the grandparents editpart, but the
only thing i get, is null. There is a

protected Command createChangeConstraintCommand(ChangeBoundsRequest request,
EditPart child, Object constraint)

method in the grandparents editpolicies, so that shouldnt be the problem.

In the end i wanted to execute the command on the CommandStack:

CommandStack cs = getViewer().getEditDomain().getCommandStack();

Can someone help me? I currently have no idea, why i receive a null from
my parent. Or is there any other way of firing a request for changing
the size of another element?

Thanks for help!

Previous Topic:"Static" GEF Figures?
Next Topic:org.eclipse.gef.text.examples
Goto Forum:

Current Time: Fri Oct 09 06:52:42 GMT 2015

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

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