Skip to main content

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:drag and drop between two plugins
Next Topic:Context Sensitive help for AbstractGraphicalEditPart
Goto Forum:

Current Time: Sun Oct 17 05:45:45 GMT 2021

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

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

Back to the top