Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: some questions on modifying mouse event handling

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


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690