Package java.awt

Examples of java.awt.MediaTracker.waitForID()


            URL imageUrl = getClass().getResource(imageFileName);
            image_ = toolkit.getImage(imageUrl);
           
            MediaTracker mediaTracker = new MediaTracker(this);
            mediaTracker.addImage(image_, 0);
            mediaTracker.waitForID(0);
           
            width_  = image_.getWidth(this);
            height_ = image_.getHeight(this);
           
            Dimension screenSize = toolkit.getScreenSize();
View Full Code Here


          byte[] imageData = new byte[in.available()];
          in.read(imageData);
          Image image = Toolkit.getDefaultToolkit().createImage(imageData);
          MediaTracker mediaTracker = new MediaTracker(new Container());
          mediaTracker.addImage(image, 0);
          mediaTracker.waitForID(0);
          int imageWidth = image.getWidth(null);
          int imageHeight = image.getHeight(null);

          in.close();
          in = null;
View Full Code Here

    input.read(imageData);
    Image image = Toolkit.getDefaultToolkit().createImage(imageData);

    MediaTracker mediaTracker = new MediaTracker(new Container());
    mediaTracker.addImage(image, 0);
    mediaTracker.waitForID(0);

    // determine thumbnail size from WIDTH and HEIGHT
    int imageWidth = image.getWidth(null);
    int imageHeight = image.getHeight(null);
    double imageRatio = (double) imageWidth / (double) imageHeight;
View Full Code Here

    byte[] imageData = new byte[input.available()];
    input.read(imageData);
    Image image = Toolkit.getDefaultToolkit().createImage(imageData);
    MediaTracker mediaTracker = new MediaTracker(new Container());
    mediaTracker.addImage(image, 0);
    mediaTracker.waitForID(0);

    // determine thumbnail size from WIDTH and HEIGHT
    int imageWidth = image.getWidth(null);
    int imageHeight = image.getHeight(null);
    double imageRatio = (double) imageWidth / (double) imageHeight;
View Full Code Here

                    imageLocation = new URL(splash);
                }
                Image i = Toolkit.getDefaultToolkit().getImage(imageLocation);
                MediaTracker mediaTracker = new MediaTracker(splashFrame);
                mediaTracker.addImage(i, 0);
                mediaTracker.waitForID(0);
                JLabel icon = new JLabel(new ImageIcon(i));
                splashFrame.setUndecorated(true);
                splashFrame.getContentPane().add(icon);
                splashFrame.pack();
                splashFrame.setLocationRelativeTo(null);
View Full Code Here

        try{
            Image image = Toolkit.getDefaultToolkit().getImage(new File(path, processDefId + IMAGE_EXTENSION).getAbsolutePath());
            MediaTracker mediaTracker = new MediaTracker(new Container());
            mediaTracker.addImage(image, 0);
            mediaTracker.waitForID(0);

            double thumbRatio = (double) thumbWidth / (double) thumbHeight;
            int imageWidth = image.getWidth(null);
            int imageHeight = image.getHeight(null);
            double imageRatio = (double) imageWidth / (double) imageHeight;
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.