| 
| Selection in GEF [message #66321] | Mon, 24 February 2003 12:41  |  | 
| Eclipse User  |  |  |  |  | Hi, 
 I would like to change the appearance of a figure and update my model when
 user select a figure (e.g. when I select a label in the logic editor
 example, there are 4 small black squares in the corners) . Do I need to
 implmenet my edit policy with the SELECTION_FEEDBACK_ROLE = "Selection
 Feedback"?
 
 But in the logic editor example, only container add SELECTION_FEEDBACK_ROLE,
 not the label itself. Where in the example which in install the edit policy
 for the selection feedback of the label?
 
 Thanks for any help.
 
 installEditPolicy(
 
 EditPolicy.SELECTION_FEEDBACK_ROLE,
 
 new ContainerHighlightEditPolicy());
 |  |  |  | 
|  | 
|  | 
| 
| Re: Selection in GEF [message #66425 is a reply to message #66405] | Mon, 24 February 2003 22:16  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: none.us.ibm.com 
 The easiest way is to subclass SelectionEditPolicy, or copy the code from
 it.
 
 "Hal" <otaconss2@hotmail.com> wrote in message
 news:b3e8cg$f8s$1@rogue.oti.com...
 > Thanks. Could you please tell me how can a editpolicy know if the figure
 has
 > been selected by the user?
 >
 > Thank you again.
 >
 > "Randy Hudson" <none@us.ibm.com> wrote in message
 > news:b3e5pt$dm9$1@rogue.oti.com...
 > >
 > > "Hal" <otaconss2@hotmail.com> wrote in message
 > > news:b3djrf$tn7$1@rogue.oti.com...
 > > > Hi,
 > > >
 > > > I would like to change the appearance of a figure and update my model
 > when
 > >
 > > Model? How would you change the model on selection?
 > >
 > > > But in the logic editor example, only container add
 > > SELECTION_FEEDBACK_ROLE,
 > > > not the label itself. Where in the example which in install the edit
 > > policy
 > > > for the selection feedback of the label?
 > >
 > > Any EditPolicy can decide to change the figure's appearance when the
 > > EditPart is selected.  The role is not too important unless you are
 > > dynamically switch edit policies, or subclasses wish to remove a role
 > added
 > > in the superclass.
 > >
 > >
 >
 >
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.03487 seconds