How Roles works? [message #221976] |
Wed, 23 August 2006 09:51  |
Eclipse User |
|
|
|
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 15:41  |
Eclipse User |
|
|
|
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.
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04654 seconds