Is there any relationship between Roles and EditPolicies? [message #5925] |
Thu, 30 May 2002 21:30 |
Eclipse User |
|
|
|
Originally posted by: eric_to_jeff.hotmail.com
Hi,
For code
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ResizableEditPolicy());
&
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new
ResizableEditPolicy());
It seems all these code worked!
Thanks
Eric
|
|
|
Re: Is there any relationship between Roles and EditPolicies? [message #6481 is a reply to message #5925] |
Thu, 30 May 2002 19:11  |
Eclipse User |
|
|
|
Originally posted by: none.ibm.com
The Role is just a "tag" that your application uses to key each Policy.
Think hashtable.
The reason for tagging the policy is so subclasses replace behavior
installed by the superclass.
Or, a single EditPart might have dynamic behavior based on some property.
The Roles allow him to replace the policy as the property changes.
"Eric Sun" <eric_to_jeff@hotmail.com> wrote in message
news:ad6hse$ncu$1@rogue.oti.com...
> Hi,
>
> For code
>
> installEditPolicy(EditPolicy.COMPONENT_ROLE, new ResizableEditPolicy());
> &
> installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new
> ResizableEditPolicy());
>
> It seems all these code worked!
>
> Thanks
>
> Eric
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03726 seconds