1 11 package org.eclipse.jdt.internal.ui.viewsupport; 12 13 import org.eclipse.swt.graphics.Image; 14 import org.eclipse.swt.graphics.ImageData; 15 16 import org.eclipse.jface.resource.ImageDescriptor; 17 18 20 public class ImageImageDescriptor extends ImageDescriptor { 21 22 private Image fImage; 23 24 27 public ImageImageDescriptor(Image image) { 28 super(); 29 fImage= image; 30 } 31 32 35 public ImageData getImageData() { 36 return fImage.getImageData(); 37 } 38 39 42 public boolean equals(Object obj) { 43 return (obj != null) && getClass().equals(obj.getClass()) && fImage.equals(((ImageImageDescriptor)obj).fImage); 44 } 45 46 49 public int hashCode() { 50 return fImage.hashCode(); 51 } 52 53 } 54 | Popular Tags |