Polling an edit part? [message #201671] |
Wed, 02 November 2005 15:53 |
Eclipse User |
|
|
|
Originally posted by: mikydna.yahoo.com
Hello all,
I'm writing a device simulator with GEF. I was wondering if anyone had
ideas on how I could "poll" an editpart for mouse events.
I figure I'd start the poll on the mouseEntered event and stop the poll
on the mouseExited event; however, I'm not having much luck getting it
to work.
Any suggestions would be appreciated.
Andy-
|
|
|
|
Re: Polling an edit part? [message #201743 is a reply to message #201703] |
Thu, 03 November 2005 00:51 |
Eclipse User |
|
|
|
Originally posted by: mikydna.yahoo.com
How would you handle the actual poll tho?
Andy-
Harsh wrote:
> You can add a MouseMotionListener to the IFigure associated with an edit
> part.
>
> Harsh
>
|
|
|
Re: Polling an edit part? [message #201750 is a reply to message #201743] |
Thu, 03 November 2005 02:04 |
Eclipse User |
|
|
|
Originally posted by: Lamont_Gilbert.rigidsoftware.com
What do you mean by poll?
CL
Andy Kim wrote:
>
> How would you handle the actual poll tho?
>
> Andy-
>
>
> Harsh wrote:
>
>> You can add a MouseMotionListener to the IFigure associated with an
>> edit part.
>>
>> Harsh
>>
>
>
|
|
|
Re: Polling an edit part? [message #201758 is a reply to message #201750] |
Thu, 03 November 2005 02:32 |
Eclipse User |
|
|
|
Originally posted by: mikydna.yahoo.com
Hi Guys,
Basically, I have a sensor that polls the environment very "x" seconds.
In the simulated version, I just wanted to do the same thing, except
polling for whether the mouse is located with in the edit part.
Anyhow, I figured it out. The answer was in another thread. I just
created a new Job. It seems to be working so far.
Thanks!
Andy-
CL [dnoyeb] Gilbert wrote:
> What do you mean by poll?
>
>
> CL
>
> Andy Kim wrote:
>>
>> How would you handle the actual poll tho?
>>
>> Andy-
>>
>>
>> Harsh wrote:
>>
>>> You can add a MouseMotionListener to the IFigure associated with an
>>> edit part.
>>>
>>> Harsh
>>>
>>
>>
|
|
|
Re: Polling an edit part? [message #201782 is a reply to message #201758] |
Thu, 03 November 2005 13:16 |
Eclipse User |
|
|
|
Originally posted by: Lamont_Gilbert.rigidsoftware.com
most efficient way would be to start a timer, and add a moust listener
to the edit part. And when the mouse moves over the edit part check the
time. If when time expires mouse is over view, you consider it a hit.
Probably works the same as using a job.
CL
Andy Kim wrote:
>
>
> Hi Guys,
>
> Basically, I have a sensor that polls the environment very "x" seconds.
> In the simulated version, I just wanted to do the same thing, except
> polling for whether the mouse is located with in the edit part.
>
> Anyhow, I figured it out. The answer was in another thread. I just
> created a new Job. It seems to be working so far.
>
> Thanks!
>
> Andy-
>
> CL [dnoyeb] Gilbert wrote:
>
>> What do you mean by poll?
>>
>>
>> CL
>>
>> Andy Kim wrote:
>>
>>>
>>> How would you handle the actual poll tho?
>>>
>>> Andy-
>>>
>>>
>>> Harsh wrote:
>>>
>>>> You can add a MouseMotionListener to the IFigure associated with an
>>>> edit part.
>>>>
>>>> Harsh
>>>>
>>>
>>>
|
|
|
Powered by
FUDForum. Page generated in 0.03655 seconds