Lines Matching refs:image

28 import java.awt.image.*;
49 * of the image.
52 * For further information and examples of using image icons, see
72 * images symbolically rather than including the image data
78 transient Image image;
139 * Creates an ImageIcon from the specified file. The image will
141 * of the image.
142 * @param filename the name of the file containing the image
143 * @param description a brief textual description of the image
147 image = Toolkit.getDefaultToolkit().getImage(filename);
148 if (image == null) {
153 loadImage(image);
157 * Creates an ImageIcon from the specified file. The image will
159 * of the image. The specified String can be a file name or a
178 * Creates an ImageIcon from the specified URL. The image will
180 * of the image.
181 * @param location the URL for the image
182 * @param description a brief textual description of the image
186 image = Toolkit.getDefaultToolkit().getImage(location);
187 if (image == null) {
192 loadImage(image);
196 * Creates an ImageIcon from the specified URL. The image will
198 * of the image.
201 * @param location the URL for the image
209 * Creates an ImageIcon from the image.
210 * @param image the image
211 * @param description a brief textual description of the image
213 public ImageIcon(Image image, String description) {
214 this(image);
219 * Creates an ImageIcon from an image object.
220 * If the image has a "comment" property that is a string,
222 * @param image the image
226 public ImageIcon (Image image) {
227 this.image = image;
228 Object o = image.getProperty("comment", imageObserver);
232 loadImage(image);
237 * read from an image file containing a supported image format,
240 * by reading an image using Class.getResourceAsStream(), but
243 * @param imageData an array of pixels in an image format supported
245 * @param description a brief textual description of the image
249 this.image = Toolkit.getDefaultToolkit().createImage(imageData);
250 if (image == null) {
254 loadImage(image);
259 * read from an image file containing a supported image format,
262 * by reading an image using Class.getResourceAsStream(), but
264 * If the resulting image has a "comment" property that is a string,
267 * @param imageData an array of pixels in an image format supported by
274 this.image = Toolkit.getDefaultToolkit().createImage(imageData);
275 if (image == null) {
278 Object o = image.getProperty("comment", imageObserver);
282 loadImage(image);
286 * Creates an uninitialized image icon.
292 * Loads the image, returning only when the image is loaded.
293 * @param image the image
295 protected void loadImage(Image image) {
300 mTracker.addImage(image, id);
307 mTracker.removeImage(image, id);
309 width = image.getWidth(imageObserver);
310 height = image.getHeight(imageObserver);
315 * Returns an ID to use with the MediaTracker in loading an image.
344 * Returns the status of the image loading operation.
360 return image;
364 * Sets the image displayed by this icon.
365 * @param image the image
367 public void setImage(Image image) {
368 this.image = image;
369 loadImage(image);
373 * Gets the description of the image. This is meant to be a brief
376 * of the image.
379 * @return a brief textual description of the image
386 * Sets the description of the image. This is meant to be a brief
389 * of the image.
390 * @param description a brief textual description of the image
401 * If this icon has no image observer,
406 * if this icon has no image observer
413 g.drawImage(image, x, y, c);
415 g.drawImage(image, x, y, imageObserver);
438 * Sets the image observer for the image. Set this
448 * @param observer the image observer
455 * Returns the image observer for the image.
457 * @return the image observer, which may be null
465 * Returns a string representation of this image.
467 * @return a string representing this image
488 image = tk.createImage(new MemoryImageSource(w, h, cm, pixels, 0, w));
489 loadImage(image);
501 int[] pixels = image != null? new int[w * h] : null;
503 if (image != null) {
505 PixelGrabber pg = new PixelGrabber(image, 0, 0, w, h, pixels, 0, w);
508 throw new IOException("failed to load image contents");
512 throw new IOException("image load interrupted");
529 * For image icons, the AccessibleContext takes the form of an
550 * Java Accessibility API appropriate to image icon user-interface