SelectionTool - something like a "selection changed" event/request? [message #158154] |
Tue, 16 November 2004 20:32 |
Eclipse User |
|
|
|
Originally posted by: iwan.global.co.za
Hello,
Supposing a user clicks on something with the selection tool active - does
it generate a request? I need somehow to intercept such an event.
I am struggling to find some sort of definitive document describing what
events the SelectionTool reacts on, and what Requests it generates for
each. Is there something like this out there?
-i
|
|
|
Re: SelectionTool - something like a "selection changed" event/request? [message #158195 is a reply to message #158154] |
Wed, 17 November 2004 00:47 |
Eclipse User |
|
|
|
Originally posted by: caniszc.us.ibm.com
Iwan Vosloo wrote:
> Hello,
>
> Supposing a user clicks on something with the selection tool active -
> does it generate a request? I need somehow to intercept such an event.
>
> I am struggling to find some sort of definitive document describing what
> events the SelectionTool reacts on, and what Requests it generates for
> each. Is there something like this out there?
>
> -i
>
/**
* @see org.eclipse.gef.EditPart#setSelected(int)
*/
public void setSelected(int value) {
super.setSelected(value);
}
To deal with object specific selections I override that method. I
specifically use it to add highlights to my editparts when they are
selected. Is this the best way to do it? Not sure, so if any GEF
developers want to give a better idea how to deal with this, go for it!
Peace,
~ Chris
|
|
|
|
|
|
Re: SelectionTool - something like a "selection changed" event/request? [message #158449 is a reply to message #158227] |
Thu, 18 November 2004 11:01 |
Eclipse User |
|
|
|
Originally posted by: iwan.global.co.za
Hi,
thanks to all (and Randy's reply on my earlier post). I have also found
setSelected and proceeded to use it, although I was a bit uncomfortable
with the idea. A SelectionEditPolicy seems to be the proper answer then -
I have looked for it and could not find it though :-), so I will revisit
the issue.
-i
Pratik Shah wrote:
> You should have a SelectionEditPolicy installed on the EditPart (which you
> probably already have) and should override its showSelection() and
> hideSelection() methods.
|
|
|
|
Powered by
FUDForum. Page generated in 0.04241 seconds