Package java.awt

Examples of java.awt.MediaTracker.waitForID()


        Image preview = entityImage.loadPreviewImage();

        MediaTracker loadTracker = new MediaTracker(comp);
        loadTracker.addImage(preview, 0);
        try {
            loadTracker.waitForID(0);
        } catch (InterruptedException e) {
            // should never come here

        }
       
View Full Code Here


      return obj;
    Image image = (Image) obj;
    MediaTracker tracker = new MediaTracker(display);
    tracker.addImage(image, 0);
    try {
      tracker.waitForID(0);
    } catch (InterruptedException e) {
      // Got to do something?
    }
    return image;
  }
View Full Code Here

      image = Toolkit.getDefaultToolkit().createImage(fullPathName);
    }
    try {
      MediaTracker mediaTracker = new MediaTracker(viewer.getDisplay());
      mediaTracker.addImage(image, 0);
      mediaTracker.waitForID(0);
      /* SUN but here for malformed URL - can't trap
       Uncaught error fetching image:
       java.lang.NullPointerException
       at sun.net.www.ParseUtil.toURI(Unknown Source)
       at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
View Full Code Here

        tracker.addImage(image, 1);
       
        try
        {
            // wait til image is loaded.
            tracker.waitForID(1);
           
            picture_ = new BufferedImage( image.getWidth(null), image.getWidth(null), BufferedImage.TYPE_INT_ARGB );
            Graphics2D picture_g = picture_.createGraphics();
           
            picture_g.drawImage( image, 0, 0, null );
View Full Code Here

      MediaTracker tracker = new MediaTracker(this);
      tracker.addImage(background_image_, 1);
      try
      {
        // wait til image is loaded.
        tracker.waitForID(1);
      }
      catch (InterruptedException e)
      {
        background_image_ = null;
      }
View Full Code Here

        MediaTracker mt = new MediaTracker(frame);
        splashImage = Toolkit.getDefaultToolkit().
                getImage(url);
        mt.addImage(splashImage, 0);

        mt.waitForID(0);

        Window splashScreen = new Window(frame) {
            public void paint(Graphics g) {
                if(splashImage != null) {
                    g.drawImage(splashImage, 0, 0, this);
View Full Code Here

            Image img = Toolkit.getDefaultToolkit().getImage(IMAGE_FILE_NAME);
            MediaTracker tracker = new MediaTracker(component);
            tracker.addImage(img, 0);

            try {
                tracker.waitForID(0);
            } catch (InterruptedException e) {
                System.err.println(e + "... in LayerImageFigure");
            }

            ImageFigure imgFig = new ImageFigure(img);
View Full Code Here

      java.awt.Image awtImage = Toolkit.getDefaultToolkit().createImage(data);
      MediaTracker mediaTracker = new MediaTracker(new Frame());
      mediaTracker.addImage(awtImage, 0);
      try
      {
        mediaTracker.waitForID(0);
      }
      catch (InterruptedException ie)
      {
        return null;
      }
View Full Code Here

    }
    MediaTracker mt = new MediaTracker(frame);
    mt.addImage(image, 0);
    try
    {
      mt.waitForID(0);
    }
    catch (InterruptedException e)
    {
      return null;
    }
View Full Code Here

    MediaTracker mc = new MediaTracker(this);
    mc.addImage(img,0);

    try
    {
     mc.waitForID(0);
    } catch (InterruptedException ex)
    {
    }
    return img;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.