Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How Roles works?
How Roles works? [message #221976] Wed, 23 August 2006 13:51 Go to next message
Eclipse UserFriend
Originally posted by: paolo.reitelli.datamat.it

Hi all,

I understood the meaning of the edit policies, but I didnt understood how to
associate the edit policies to editparts by the roles:

I have a java model (representing a form) structured like this:

form
|
|
->Containers
|
|
|---> Controls

I want the user to be able to resize controls: I suppose I must use
ResizableEditPolicy but how can I associate this policy to the
ControlEditPart? In particular, when I call installEditPolicy in the
createEditPolicies method of ControlEditPart, which Role have I to use?


thanks in advance,
Paolo.
Re: How Roles works? [message #222021 is a reply to message #221976] Wed, 23 August 2006 19:41 Go to previous message
Nhu Le is currently offline Nhu LeFriend
Messages: 47
Registered: July 2009
Member
In the programmer guide, it states:

"GEF provides several identifiers for commonly used roles. Roles become
important when an editpart needs to have its policies removed or swapped
out. The rest of the time it is just a good habit."

Gef doesn't use the role (which are strings) to determine the
capabilities of an editpolicy. So don't worry too much about that, use
whatever role you think is appropriate.

Nhu Le


PaoloReitelli wrote:
> Hi all,
>
> I understood the meaning of the edit policies, but I didnt understood how to
> associate the edit policies to editparts by the roles:
>
> I have a java model (representing a form) structured like this:
>
> form
> |
> |
> ->Containers
> |
> |
> |---> Controls
>
> I want the user to be able to resize controls: I suppose I must use
> ResizableEditPolicy but how can I associate this policy to the
> ControlEditPart? In particular, when I call installEditPolicy in the
> createEditPolicies method of ControlEditPart, which Role have I to use?
>
>
> thanks in advance,
> Paolo.
>
>
Previous Topic:UNDO 2 times
Next Topic:Selecting anchors (based on logic example)
Goto Forum:
  


Current Time: Thu Apr 25 19:36:18 GMT 2024

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

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

Back to the top