NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: some questions on modifying mouse event handling

  • To: Harry Hochheiser <hsh@xxxxxxx>
  • Subject: Re: some questions on modifying mouse event handling
  • From: Bill Hibbard <billh@xxxxxxxxxxxxx>
  • Date: Tue, 10 Feb 2004 13:35:07 -0600 (CST)
Hi Harry,

We're always happy to help folks who dig into
things like you are.

> So, I created a new file MouseOverHelper, which is a subclass of
> MouseHelper, contaiing the _exact_same_  code as MouseHelper. I then
> created a subclass of MouseBehavior to use this new mouse helper,
> installed it in my renderer, and it works great.
>
> but, as I said, it's more than a bit of a hack.
>
> so, my first question is this: is there a cleaner way to do this?

Sounds like you're on a good track.

> My second question: what about modifying MouseHelper to make it more
> easily subclassed? I can imagine abstracting out some of the bits in
> processEvents to make them easily subclassable. Alternatively, the
> "private" members in MouseHelper could be changed to protected. I'd be
> glad to try to sketch up such a revised version if it would be helpful.

That would be great. If you want to send me a modified
version of MouseHelper, whose only modifications are to
change private and package (i.e., no access modifier)
variables and methods to protected, I will put it into
the system. If you want to change all non-public variables
and methods to protected, that's OK.

Cheers,
Bill


  • 2004 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: