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

Re: MouseBehaviorJ2D construction (fwd)

Hi Geoff,

Rather than hunting down the cause of your Exception, I'll
recommend following the procedure described at:

  
http://my.unidata.ucar.edu/content/support/help/MailArchives/visad-list/msg01899.html

Your application should never need to explicitly construct
a MouseBehavior or MouseHelper instance. If you need to
extend one of these classes, you simply pass the .class
of your extension classes to the MouseBehaviorJ2D (super)
and DefaultDisplayRendererJ2D constructors, as described in
the above archive message.

Good luck,
Bill

On Fri, 12 Aug 2005, Geoff Freeman wrote:

> ----- Forwarded message from grf -----
>
> From grf Fri Jul 15 06:20:33 2005
> Subject: MouseBehaviorJ2D construction
> To: visad-list@xxxxxxxxxxxxx
> Date: Fri, 15 Jul 2005 06:20:33 +0000 (GMT)
> Full-Name: Geoff Freeman
> Reply-To: g.freeman@xxxxxxxxxx
> X-Mailer: ELM [2.4]
> Content-Length:   779
>
> Hi All,
>
> A simple question. I tried to construct a MousBehaviorJ2D and got the
> following error
>
> Exception in thread "main" visad.VisADError: cannot construct class 
> visad.MouseHelper
>       at visad.java2d.MouseBehaviorJ2D.<init>(MouseBehaviorJ2D.java:73)
>       at visad.java2d.MouseBehaviorJ2D.<init>(MouseBehaviorJ2D.java:57)
>       at MT.<init>(MT.java:13)
>       at MT.main(MT.java:8)
>
> Is there a better way to try to make a MouseHelperJ2D?
>
> The simple program is below
>
> Thanks
>
> Geoff
> --
> Bureau of Meteorology
> Phone (03) 9669 4827
> ------------------------------------
> import visad.*;
> import visad.java2d.*;
>
> public class MT
> {
>       public static void main(String[] args)
>       {
>               MT mt = new MT();
>       }
>
>       public MT()
>       {
>               MouseBehaviorJ2D m2D
>                       new MouseBehaviorJ2D(new DefaultDisplayRendererJ2D());
>       }
> }
>
> ----- End of forwarded message from grf -----
>
> --
> Bureau of Meteorology
> Phone (03) 9669 4827
>
>


 
 
  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