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

int ImageCanvas::setImage ( Image  img ) [inline]

sets the current image (refreshes frame)

Definition at line 131 of file ImageCanvas.java.

References wait().

Referenced by couldNotConnect(), and ImageCanvas().

      {
            if(first_image && mainWindow != null)
            {
                  int w, h;
                  while((w = img.getWidth(null)) < 0 || (h = img.getHeight(null)) < 0);
                  System.out.println("w = " + w + ", h = " + h);
                  mainWindow.setBounds(100,100,w,h);
                  first_image = false;
            }
            int count = 0, waitTime = 5;
            while (!prepareImage(img,this))
            {
                  wait(waitTime);
                  count ++;
                  if (count * waitTime > 5000) break;
            }
            currentImage = img;
            repaint();
            return (count * waitTime);
      }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index