Logo Search packages:      
Sourcecode: webcam-server version File versions  Download package

ImageCanvas::ImageCanvas ( Applet  applet,
String  host,
int  port,
int  fps,
int  width,
int  height 
) [inline]

Creates a new instance of ImageCanvas

Definition at line 54 of file ImageCanvas.java.

References setImage().

                                                                                               {
            this.applet = applet;
            this.host = host;
            this.port = port;
            this.fps = fps;
            
            preferredSize = new Dimension(width,height);
            
            if (applet == null)
            {
                  File f = new File(connectingImageFilename);
                  if(f.exists())
                        setImage(Toolkit.getDefaultToolkit().getImage(connectingImageFilename));
                  else
                        System.out.println(connectingImageFilename + " not found");
            }
            else
            {
                  try {
                        setImage(applet.getImage(new URL(applet.getCodeBase().toString() + connectingImageFilename)));
                  } catch(MalformedURLException e) {}
            }
            
            about = createAbout();
            add(createMenu());
            thisImageCanvas = this;

            // mouse listener
            addMouseListener(createMouseListener());
            downloader = new ImageDownloader(host,port, fps, this);
            downloader.start();
      }

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index