[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.gef] Re: How do I resize an element and the element inside it?

Wait, It appears to have worked for now. I used SELECTION_ROLE_FEEDBACK. Later I will try to make everything else to worl

Daniel D. Vanzin wrote:
But If I use ResizableEditPolicy as a PRIMARY_DRAG_ROLE, I loose the selection handles in my element, together with the ability to move/resize.

installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new
              ResizableEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new
              DiagramLayoutEditPolicy()); /extends XYEditPolicy

Is there something different I should be doing?

thanks

Randy Hudson wrote:
You need to be using the XYLayoutPolicy on the *parents* of anything that you want to resize. ResizableEditPolicy is not a LAYOUT_ROLE. It is PRIMARY_DRAG_ROLE.

boa sorte.

"Daniel D. Vanzin" <ddv@xxxxxxxxxxxx> wrote in message news:dtd1i7$4q0$1@xxxxxxxxxxxxxxxxxxxx
If I define a LAYOUT_ROLE to something like XYLayoutPolicy, then I can resize the children, but not the parent. IF its a ResizableEditPolicy, the parent can be resized, but not the childres.

Should I implement a new policy? If so, any tips how? I want that whenever the parent resizes, so does the children. But the opposite is not always true.

thanks