sun.awt.image.URLImageSource Java Examples

The following examples show how to use sun.awt.image.URLImageSource. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SunToolkit.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
static Image getImageFromHash(Toolkit tk, URL url) {
    checkPermissions(url);
    synchronized (urlImgCache) {
        String key = url.toString();
        Image img = (Image)urlImgCache.get(key);
        if (img == null) {
            try {
                img = tk.createImage(new URLImageSource(url));
                urlImgCache.put(key, img);
            } catch (Exception e) {
            }
        }
        return img;
    }
}
 
Example #2
Source File: SunToolkit.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
static Image getImageFromHash(Toolkit tk, URL url) {
    checkPermissions(url);
    synchronized (urlImgCache) {
        String key = url.toString();
        Image img = (Image)urlImgCache.get(key);
        if (img == null) {
            try {
                img = tk.createImage(new URLImageSource(url));
                urlImgCache.put(key, img);
            } catch (Exception e) {
            }
        }
        return img;
    }
}
 
Example #3
Source File: SunToolkit.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Image createImage(URL url) {
    checkPermissions(url);
    return createImage(new URLImageSource(url));
}
 
Example #4
Source File: AppletImageRef.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Reconsitute the image.  Only called when the ref has been flushed.
 */
public Object reconstitute() {
    Image img = Toolkit.getDefaultToolkit().createImage(new URLImageSource(url));
    return img;
}
 
Example #5
Source File: AppletImageRef.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Reconsitute the image.  Only called when the ref has been flushed.
 */
public Object reconstitute() {
    Image img = Toolkit.getDefaultToolkit().createImage(new URLImageSource(url));
    return img;
}
 
Example #6
Source File: AppletImageRef.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Reconsitute the image.  Only called when the ref has been flushed.
 */
public Object reconstitute() {
    Image img = Toolkit.getDefaultToolkit().createImage(new URLImageSource(url));
    return img;
}
 
Example #7
Source File: AppletImageRef.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Reconsitute the image.  Only called when the ref has been flushed.
 */
public Object reconstitute() {
    Image img = Toolkit.getDefaultToolkit().createImage(new URLImageSource(url));
    return img;
}
 
Example #8
Source File: AppletImageRef.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Reconsitute the image.  Only called when the ref has been flushed.
 */
public Object reconstitute() {
    Image img = Toolkit.getDefaultToolkit().createImage(new URLImageSource(url));
    return img;
}
 
Example #9
Source File: AppletImageRef.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Reconsitute the image.  Only called when the ref has been flushed.
 */
public Object reconstitute() {
    Image img = Toolkit.getDefaultToolkit().createImage(new URLImageSource(url));
    return img;
}
 
Example #10
Source File: AppletImageRef.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Reconsitute the image.  Only called when the ref has been flushed.
 */
public Object reconstitute() {
    Image img = Toolkit.getDefaultToolkit().createImage(new URLImageSource(url));
    return img;
}
 
Example #11
Source File: AppletImageRef.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Reconsitute the image.  Only called when the ref has been flushed.
 */
public Image reconstitute() {
    Image img = Toolkit.getDefaultToolkit().createImage(new URLImageSource(url));
    return img;
}
 
Example #12
Source File: AppletImageRef.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Reconsitute the image.  Only called when the ref has been flushed.
 */
public Object reconstitute() {
    Image img = Toolkit.getDefaultToolkit().createImage(new URLImageSource(url));
    return img;
}
 
Example #13
Source File: SunToolkit.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
@Override
public Image createImage(URL url) {
    checkPermissions(url);
    return createImage(new URLImageSource(url));
}
 
Example #14
Source File: AppletImageRef.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Reconsitute the image.  Only called when the ref has been flushed.
 */
public Object reconstitute() {
    Image img = Toolkit.getDefaultToolkit().createImage(new URLImageSource(url));
    return img;
}
 
Example #15
Source File: AppletImageRef.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Reconsitute the image.  Only called when the ref has been flushed.
 */
public Object reconstitute() {
    Image img = Toolkit.getDefaultToolkit().createImage(new URLImageSource(url));
    return img;
}
 
Example #16
Source File: AppletImageRef.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Reconsitute the image.  Only called when the ref has been flushed.
 */
public Object reconstitute() {
    Image img = Toolkit.getDefaultToolkit().createImage(new URLImageSource(url));
    return img;
}
 
Example #17
Source File: AppletImageRef.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Reconsitute the image.  Only called when the ref has been flushed.
 */
public Object reconstitute() {
    Image img = Toolkit.getDefaultToolkit().createImage(new URLImageSource(url));
    return img;
}