Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How do I resize an element and the element inside it?
How do I resize an element and the element inside it? [message #209872] Mon, 20 February 2006 18:24 Go to next message
Eclipse UserFriend
Originally posted by: ddv.certi.org.br

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
Re: How do I resize an element and the element inside it? [message #209883 is a reply to message #209872] Mon, 20 February 2006 18:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

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@certi.org.br> wrote in message
news:dtd1i7$4q0$1@utils.eclipse.org...
> 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
Re: How do I resize an element and the element inside it? [message #209890 is a reply to message #209883] Mon, 20 February 2006 19:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ddv.certi.org.br

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@certi.org.br> wrote in message
> news:dtd1i7$4q0$1@utils.eclipse.org...
>> 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
>
>
Re: How do I resize an element and the element inside it? [message #209893 is a reply to message #209890] Tue, 21 February 2006 00:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ddv.certi.org

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@certi.org.br> wrote in message
>> news:dtd1i7$4q0$1@utils.eclipse.org...
>>> 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
>>
>>
Re: How do I resize an element and the element inside it? [message #209997 is a reply to message #209893] Tue, 21 February 2006 18:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ddv.certi.org.br

Now resizing/moving works fine, but I can't see the feedback (the gray
rectangle)! I'm using a XYLayoutEditPolicy. Should I ovewrite something?

thanks

Daniel D. Vanzin wrote:
> 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@certi.org.br> wrote in message
>>> news:dtd1i7$4q0$1@utils.eclipse.org...
>>>> 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
>>>
>>
Re: How do I resize an element and the element inside it? [message #210013 is a reply to message #209997] Tue, 21 February 2006 21:58 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

It sounds like you might have two of the same policies installed. resize
feedback is XOR, so if it paints twice, it will erase itself.

ResizableEditPolicy should be created inside the LayoutEditPolicy in
createChildEditPolicy(...). You shouldn't install it from the editpart.


"Daniel D. Vanzin" <ddv@certi.org.br> wrote in message
news:dtfnkp$d47$1@utils.eclipse.org...
> Now resizing/moving works fine, but I can't see the feedback (the gray
> rectangle)! I'm using a XYLayoutEditPolicy. Should I ovewrite something?
>
> thanks
>
> Daniel D. Vanzin wrote:
>> 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@certi.org.br> wrote in message
>>>> news:dtd1i7$4q0$1@utils.eclipse.org...
>>>>> 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
>>>>
>>>
Previous Topic:Please add to FAQ instructions on importing example source!
Next Topic:Toggle Grid Action in ContextMenu
Goto Forum:
  


Current Time: Thu Apr 25 05:05:27 GMT 2024

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

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

Back to the top