How to make diagram elements un-movable [message #175454] |
Tue, 04 March 2008 11:51 |
Eclipse User |
|
|
|
Originally posted by: fbanica.soluta.net
Hello,
I would like to ask how can I make some of the diagram elements un-movable?
I want to have some figures which the user will be not able to move around
at all. They should stay in position no matter what. How can I can do this?
Is it possible? Thanks,
Floppy
|
|
|
|
Re: How to make diagram elements un-movable [message #175672 is a reply to message #175494] |
Tue, 04 March 2008 16:45 |
Eclipse User |
|
|
|
Originally posted by: fbanica.soluta.net
Could you be more specific, please? Which role should I use? And is this to
be installed on the element itself or on its "father"?
Thanks,
Floppy
"Boris Blajer" <boris.blajer@borland.com> wrote in message
news:fqjfge$7to$1@build.eclipse.org...
> Hi Florin,
>
> Install a NonResizableEditPolicy whose getMoveCommand() will always return
> an UnexecutableCommand.
>
> Best regards,
> Boris
>
> Florin Banica wrote:
>> Hello,
>>
>> I would like to ask how can I make some of the diagram elements
>> un-movable? I want to have some figures which the user will be not able
>> to move around at all. They should stay in position no matter what. How
>> can I can do this? Is it possible? Thanks,
>>
>>
>> Floppy
|
|
|
Re: How to make diagram elements un-movable [message #175744 is a reply to message #175672] |
Wed, 05 March 2008 10:33 |
Boris Blajer Messages: 217 Registered: July 2009 |
Senior Member |
|
|
Hi Florin,
The edit policy should be installed on the element itself. It does
really not matter which role you will use (you can use a unique role
just for this purpose), because the commands returned from different
edit policies are chained together, and chaining an unexecutable command
to anything will make it unexecutable.
However, for performance reasons, I would recommend to use the
PRIMARY_DRAG_ROLE, since the edit policy that normally controlls this
behavior (or actually, delegates this behavior to the parent) is
typically installed for this role.
Best regards,
Boris
Florin Banica wrote:
> Could you be more specific, please? Which role should I use? And is this to
> be installed on the element itself or on its "father"?
>
> Thanks,
>
>
>
> Floppy
>
>
> "Boris Blajer" <boris.blajer@borland.com> wrote in message
> news:fqjfge$7to$1@build.eclipse.org...
>> Hi Florin,
>>
>> Install a NonResizableEditPolicy whose getMoveCommand() will always return
>> an UnexecutableCommand.
>>
>> Best regards,
>> Boris
>>
>> Florin Banica wrote:
>>> Hello,
>>>
>>> I would like to ask how can I make some of the diagram elements
>>> un-movable? I want to have some figures which the user will be not able
>>> to move around at all. They should stay in position no matter what. How
>>> can I can do this? Is it possible? Thanks,
>>>
>>>
>>> Floppy
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03122 seconds