Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » GMF questions
GMF questions [message #22296] Thu, 17 August 2006 06:09 Go to next message
Eclipse UserFriend
Originally posted by: zsolt.sandor.gmail.com

Hi!

Thanks for the answers. I have some GMF questions:

1, How can I define a menu item for a node? (So if I press
the right mouse button on a graphical element, I would like
to have a new item in the context menu according the type
of the element) Is there any example about it?

2, How can I fix the size of an element (so the user
can not resize it...)

Regards:

Zsolti
Re: GMF questions [message #22680 is a reply to message #22296] Thu, 17 August 2006 12:39 Go to previous message
Eclipse UserFriend
Zsolt Sandor wrote:
> Hi!
>
> Thanks for the answers. I have some GMF questions:
>
> 1, How can I define a menu item for a node? (So if I press
> the right mouse button on a graphical element, I would like
> to have a new item in the context menu according the type
> of the element) Is there any example about it?
>
> 2, How can I fix the size of an element (so the user
> can not resize it...)
>
> Regards:
>
> Zsolti
>

regarding question 2 ; you can override the getPrimaryDragEditPolicy()
on your edit part and return NonResizableEditPolicyEx, like this

public EditPolicy getPrimaryDragEditPolicy() {
return new NonResizableEditPolicyEx();
}
Previous Topic:how to listen to the change when I add a connection in editor?
Next Topic:No menu item created for Mindmap tutorial ?
Goto Forum:
  


Current Time: Wed May 07 17:17:13 EDT 2025

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

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

Back to the top