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; } }
public Image createImage(URL url) { if (BDJXletContext.getCurrentContext() == null) { logger.error("createImage(): no context " + Logger.dumpStack()); } ImageProducer ip = new URLImageSource(url); Image newImage = createImage(ip); return newImage; }
/** * Reconsitute the image. Only called when the ref has been flushed. */ public Object reconstitute() { Image img = Toolkit.getDefaultToolkit().createImage(new URLImageSource(url)); return img; }
@Override public Image createImage(URL url) { checkPermissions(url); return createImage(new URLImageSource(url)); }
/** * Reconsitute the image. Only called when the ref has been flushed. */ public Image reconstitute() { Image img = Toolkit.getDefaultToolkit().createImage(new URLImageSource(url)); return img; }
public HBackgroundImage(URL contents) { producer = new URLImageSource(contents); img = Toolkit.getDefaultToolkit().createImage(producer); }