Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to make diagram elements un-movable
How to make diagram elements un-movable [message #175454] Tue, 04 March 2008 11:51 Go to next message
Eclipse UserFriend
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 #175494 is a reply to message #175454] Tue, 04 March 2008 12:32 Go to previous messageGo to next message
Boris Blajer is currently offline Boris BlajerFriend
Messages: 217
Registered: July 2009
Senior Member
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 #175672 is a reply to message #175494] Tue, 04 March 2008 16:45 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Boris Blajer is currently offline Boris BlajerFriend
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
>
>
Previous Topic:Reloading/Refreshing GMF editor without reopening the editor
Next Topic:Curved forking(bending) for connection seperation
Goto Forum:
  


Current Time: Thu Mar 28 13:50:11 GMT 2024

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

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

Back to the top