|Programmatically resizing an element [message #228680]
||Thu, 04 January 2007 15:58
Originally posted by: wolffischer.gmx.de|
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!
Powered by FUDForum
. Page generated in 0.02428 seconds