Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Polling an edit part?
Polling an edit part? [message #201671] Wed, 02 November 2005 15:53 Go to next message
Eclipse UserFriend
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 #201703 is a reply to message #201671] Wed, 02 November 2005 18:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: harsh.ti.com

You can add a MouseMotionListener to the IFigure associated with an edit
part.

Harsh
Re: Polling an edit part? [message #201743 is a reply to message #201703] Thu, 03 November 2005 00:51 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>>>>
>>>
>>>
Previous Topic:Labels
Next Topic:Overlapping Figures
Goto Forum:
  


Current Time: Thu Dec 26 10:30:25 GMT 2024

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

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

Back to the top