Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Selection in GEF
Selection in GEF [message #66321] Mon, 24 February 2003 17:41 Go to next message
Hal is currently offline HalFriend
Messages: 67
Registered: July 2009
Member
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 #66372 is a reply to message #66321] Mon, 24 February 2003 22:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.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.
Re: Selection in GEF [message #66405 is a reply to message #66372] Mon, 24 February 2003 23:32 Go to previous messageGo to next message
Hal is currently offline HalFriend
Messages: 67
Registered: July 2009
Member
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.
>
>
Re: Selection in GEF [message #66425 is a reply to message #66405] Tue, 25 February 2003 03:16 Go to previous message
Eclipse UserFriend
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.
> >
> >
>
>
Previous Topic:Text, Icon Alignment in draw 2D label
Next Topic:Problems with HelloGef1
Goto Forum:
  


Current Time: Fri Jul 19 12:17:54 GMT 2024

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

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

Back to the top