Skip to main content



      Home
Home » Eclipse Projects » GEF » Is there any relationship between Roles and EditPolicies?
Is there any relationship between Roles and EditPolicies? [message #5925] Thu, 30 May 2002 21:30
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>
>
Previous Topic:AnimatableFigure Question
Next Topic:Property Value Editing Problem
Goto Forum:
  


Current Time: Thu May 08 16:49:44 EDT 2025

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

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

Back to the top