Java Code Examples for java.awt.Toolkit#createImage()
The following examples show how to use
java.awt.Toolkit#createImage() .
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: TestImage.java From libreveris with GNU Lesser General Public License v3.0 | 6 votes |
public static Image decodeImage (String[] rows) { final int width = rows[0].length(); final int height = rows.length; int[] pix = new int[width * height]; int index = 0; for (String row : rows) { for (int x = 0; x < width; x++) { pix[index++] = decodeARGB (row.charAt (x)); } } // Create the proper image icon Toolkit tk = Toolkit.getDefaultToolkit (); return tk.createImage (new MemoryImageSource (width, height, pix, 0, width)); }
Example 2
Source File: jpeg.java From hottub with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("rawtypes") public Object getContent(URLConnection urlc, Class[] classes) throws IOException { Class<?>[] cls = classes; for (int i = 0; i < cls.length; i++) { if (cls[i].isAssignableFrom(URLImageSource.class)) { return new URLImageSource(urlc); } if (cls[i].isAssignableFrom(Image.class)) { Toolkit tk = Toolkit.getDefaultToolkit(); return tk.createImage(new URLImageSource(urlc)); } } return null; }
Example 3
Source File: x_xpixmap.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("rawtypes") public Object getContent(URLConnection urlc, Class[] classes) throws java.io.IOException { Class<?>[] cls = classes; for (int i = 0; i < cls.length; i++) { if (cls[i].isAssignableFrom(URLImageSource.class)) { return new URLImageSource(urlc); } if (cls[i].isAssignableFrom(Image.class)) { Toolkit tk = Toolkit.getDefaultToolkit(); return tk.createImage(new URLImageSource(urlc)); } } return null; }
Example 4
Source File: x_xbitmap.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("rawtypes") public Object getContent(URLConnection urlc, Class[] classes) throws java.io.IOException { Class<?>[] cls = classes; for (int i = 0; i < cls.length; i++) { if (cls[i].isAssignableFrom(URLImageSource.class)) { return new URLImageSource(urlc); } if (cls[i].isAssignableFrom(Image.class)) { Toolkit tk = Toolkit.getDefaultToolkit(); return tk.createImage(new URLImageSource(urlc)); } } return null; }
Example 5
Source File: x_xpixmap.java From Bytecoder with Apache License 2.0 | 5 votes |
@SuppressWarnings("rawtypes") public Object getContent(URLConnection urlc, Class[] classes) throws java.io.IOException { Class<?>[] cls = classes; for (int i = 0; i < cls.length; i++) { if (cls[i].isAssignableFrom(URLImageSource.class)) { return new URLImageSource(urlc); } if (cls[i].isAssignableFrom(Image.class)) { Toolkit tk = Toolkit.getDefaultToolkit(); return tk.createImage(new URLImageSource(urlc)); } } return null; }
Example 6
Source File: jpeg.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("rawtypes") public Object getContent(URLConnection urlc, Class[] classes) throws IOException { Class<?>[] cls = classes; for (int i = 0; i < cls.length; i++) { if (cls[i].isAssignableFrom(URLImageSource.class)) { return new URLImageSource(urlc); } if (cls[i].isAssignableFrom(Image.class)) { Toolkit tk = Toolkit.getDefaultToolkit(); return tk.createImage(new URLImageSource(urlc)); } } return null; }
Example 7
Source File: gif.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("rawtypes") public Object getContent(URLConnection urlc, Class[] classes) throws IOException { Class<?>[] cls = classes; for (int i = 0; i < cls.length; i++) { if (cls[i].isAssignableFrom(URLImageSource.class)) { return new URLImageSource(urlc); } if (cls[i].isAssignableFrom(Image.class)) { Toolkit tk = Toolkit.getDefaultToolkit(); return tk.createImage(new URLImageSource(urlc)); } } return null; }
Example 8
Source File: png.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("rawtypes") public Object getContent(URLConnection urlc, Class[] classes) throws IOException { Class<?>[] cls = classes; for (int i = 0; i < cls.length; i++) { if (cls[i].isAssignableFrom(URLImageSource.class)) { return new URLImageSource(urlc); } if (cls[i].isAssignableFrom(Image.class)) { Toolkit tk = Toolkit.getDefaultToolkit(); return tk.createImage(new URLImageSource(urlc)); } } return null; }
Example 9
Source File: png.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("rawtypes") public Object getContent(URLConnection urlc, Class[] classes) throws IOException { Class<?>[] cls = classes; for (int i = 0; i < cls.length; i++) { if (cls[i].isAssignableFrom(URLImageSource.class)) { return new URLImageSource(urlc); } if (cls[i].isAssignableFrom(Image.class)) { Toolkit tk = Toolkit.getDefaultToolkit(); return tk.createImage(new URLImageSource(urlc)); } } return null; }
Example 10
Source File: jpeg.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("rawtypes") public Object getContent(URLConnection urlc, Class[] classes) throws IOException { Class<?>[] cls = classes; for (int i = 0; i < cls.length; i++) { if (cls[i].isAssignableFrom(URLImageSource.class)) { return new URLImageSource(urlc); } if (cls[i].isAssignableFrom(Image.class)) { Toolkit tk = Toolkit.getDefaultToolkit(); return tk.createImage(new URLImageSource(urlc)); } } return null; }
Example 11
Source File: gif.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("rawtypes") public Object getContent(URLConnection urlc, Class[] classes) throws IOException { Class<?>[] cls = classes; for (int i = 0; i < cls.length; i++) { if (cls[i].isAssignableFrom(URLImageSource.class)) { return new URLImageSource(urlc); } if (cls[i].isAssignableFrom(Image.class)) { Toolkit tk = Toolkit.getDefaultToolkit(); return tk.createImage(new URLImageSource(urlc)); } } return null; }
Example 12
Source File: jpeg.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("rawtypes") public Object getContent(URLConnection urlc, Class[] classes) throws IOException { Class<?>[] cls = classes; for (int i = 0; i < cls.length; i++) { if (cls[i].isAssignableFrom(URLImageSource.class)) { return new URLImageSource(urlc); } if (cls[i].isAssignableFrom(Image.class)) { Toolkit tk = Toolkit.getDefaultToolkit(); return tk.createImage(new URLImageSource(urlc)); } } return null; }
Example 13
Source File: png.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("rawtypes") public Object getContent(URLConnection urlc, Class[] classes) throws IOException { Class<?>[] cls = classes; for (int i = 0; i < cls.length; i++) { if (cls[i].isAssignableFrom(URLImageSource.class)) { return new URLImageSource(urlc); } if (cls[i].isAssignableFrom(Image.class)) { Toolkit tk = Toolkit.getDefaultToolkit(); return tk.createImage(new URLImageSource(urlc)); } } return null; }
Example 14
Source File: x_xbitmap.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("rawtypes") public Object getContent(URLConnection urlc, Class[] classes) throws java.io.IOException { Class<?>[] cls = classes; for (int i = 0; i < cls.length; i++) { if (cls[i].isAssignableFrom(URLImageSource.class)) { return new URLImageSource(urlc); } if (cls[i].isAssignableFrom(Image.class)) { Toolkit tk = Toolkit.getDefaultToolkit(); return tk.createImage(new URLImageSource(urlc)); } } return null; }
Example 15
Source File: jpeg.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("rawtypes") public Object getContent(URLConnection urlc, Class[] classes) throws IOException { Class<?>[] cls = classes; for (int i = 0; i < cls.length; i++) { if (cls[i].isAssignableFrom(URLImageSource.class)) { return new URLImageSource(urlc); } if (cls[i].isAssignableFrom(Image.class)) { Toolkit tk = Toolkit.getDefaultToolkit(); return tk.createImage(new URLImageSource(urlc)); } } return null; }
Example 16
Source File: gif.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("rawtypes") public Object getContent(URLConnection urlc, Class[] classes) throws IOException { Class<?>[] cls = classes; for (int i = 0; i < cls.length; i++) { if (cls[i].isAssignableFrom(URLImageSource.class)) { return new URLImageSource(urlc); } if (cls[i].isAssignableFrom(Image.class)) { Toolkit tk = Toolkit.getDefaultToolkit(); return tk.createImage(new URLImageSource(urlc)); } } return null; }
Example 17
Source File: x_xpixmap.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("rawtypes") public Object getContent(URLConnection urlc, Class[] classes) throws java.io.IOException { Class<?>[] cls = classes; for (int i = 0; i < cls.length; i++) { if (cls[i].isAssignableFrom(URLImageSource.class)) { return new URLImageSource(urlc); } if (cls[i].isAssignableFrom(Image.class)) { Toolkit tk = Toolkit.getDefaultToolkit(); return tk.createImage(new URLImageSource(urlc)); } } return null; }
Example 18
Source File: x_xbitmap.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("rawtypes") public Object getContent(URLConnection urlc, Class[] classes) throws java.io.IOException { Class<?>[] cls = classes; for (int i = 0; i < cls.length; i++) { if (cls[i].isAssignableFrom(URLImageSource.class)) { return new URLImageSource(urlc); } if (cls[i].isAssignableFrom(Image.class)) { Toolkit tk = Toolkit.getDefaultToolkit(); return tk.createImage(new URLImageSource(urlc)); } } return null; }
Example 19
Source File: jpeg.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("rawtypes") public Object getContent(URLConnection urlc, Class[] classes) throws IOException { Class<?>[] cls = classes; for (int i = 0; i < cls.length; i++) { if (cls[i].isAssignableFrom(URLImageSource.class)) { return new URLImageSource(urlc); } if (cls[i].isAssignableFrom(Image.class)) { Toolkit tk = Toolkit.getDefaultToolkit(); return tk.createImage(new URLImageSource(urlc)); } } return null; }
Example 20
Source File: gif.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("rawtypes") public Object getContent(URLConnection urlc, Class[] classes) throws IOException { Class<?>[] cls = classes; for (int i = 0; i < cls.length; i++) { if (cls[i].isAssignableFrom(URLImageSource.class)) { return new URLImageSource(urlc); } if (cls[i].isAssignableFrom(Image.class)) { Toolkit tk = Toolkit.getDefaultToolkit(); return tk.createImage(new URLImageSource(urlc)); } } return null; }