/* */ package quicktime.app.image;
/* */
/* */ import java.awt.Component;
/* */ import java.awt.Dimension;
/* */ import java.awt.Graphics;
/* */ import java.awt.Image;
/* */ import java.awt.Toolkit;
/* */ import java.awt.image.ImageProducer;
/* */ import java.net.URL;
/* */ import java.security.AccessController;
/* */ import java.security.PrivilegedAction;
/* */ import quicktime.QTException;
/* */ import quicktime.QTRuntimeException;
/* */ import quicktime.QTSession;
/* */ import quicktime.app.display.Drawable;
/* */ import quicktime.qd.QDRect;
/* */ import quicktime.qd.Region;
/* */
/* */ /** @deprecated */
/* */ public class ImageDrawer
/* */ implements Drawable
/* */ {
/* 33 */ private static ImageDrawer logo = null;
/* */
/* */ /** @deprecated */
/* */ protected Image im;
/* 105 */ private QDRect bounds = new QDRect();
/* */ protected Component canv;
/* */
/* 38 */ public static final ImageDrawer getQTLogo() { if (logo == null)
/* */ try {
/* 40 */ Class localClass = Class.forName("quicktime.app.image.ImageDrawer");
/* 41 */ Object localObject = null;
/* 42 */ if (QTSession.getJavaVersion() == 65537)
/* */ {
/* 44 */ localObject = localClass.getResource("/qt3logo.jpg").getContent();
/* */ }
/* */ else
/* */ {
/* 67 */ localObject = new Object()
/* */ {
/* */ Object getContent()
/* */ {
/* 52 */ return AccessController.doPrivileged(new PrivilegedAction()
/* */ {
/* */ public Object run() {
/* 55 */ Object localObject = null;
/* */ try {
/* 57 */ URL localURL = ImageDrawer.this.getResource("/qt3logo.jpg");
/* 58 */ localObject = localURL.getContent();
/* */ }
/* */ catch (Exception localException) {
/* */ }
/* 62 */ return localObject;
/* */ }
/* */ });
/* */ }
/* */ }
/* 67 */ .getContent();
/* */ }
/* 69 */ Image localImage = Toolkit.getDefaultToolkit().createImage((ImageProducer)localObject);
/* 70 */ logo = new ImageDrawer(new Dimension(162, 162), localImage);
/* */ }
/* */ catch (Exception localException)
/* */ {
/* */ }
/* 75 */ return logo;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public ImageDrawer()
/* */ {
/* */ }
/* */
/* */ public ImageDrawer(Dimension paramDimension, Image paramImage)
/* */ {
/* 94 */ this.bounds = new QDRect(paramDimension);
/* 95 */ this.im = paramImage;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public void addedTo(Object paramObject)
/* */ {
/* 120 */ if ((paramObject instanceof Component)) {
/* 121 */ this.canv = ((Component)paramObject);
/* 122 */ if (this.im != null)
/* 123 */ this.canv.prepareImage(this.im, this.canv);
/* */ }
/* */ }
/* */
/* */ /** @deprecated */
/* */ public void removedFrom(Object paramObject)
/* */ {
/* 138 */ if ((paramObject instanceof Component))
/* 139 */ this.canv = null;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public Image getImage()
/* */ {
/* 146 */ return this.im;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public void setDisplayBounds(QDRect paramQDRect)
/* */ throws QTException
/* */ {
/* 156 */ this.bounds = paramQDRect;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public QDRect getDisplayBounds()
/* */ throws QTException
/* */ {
/* 166 */ return this.bounds;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public void redraw(Region paramRegion)
/* */ throws QTException
/* */ {
/* 178 */ if ((this.canv != null) && (this.im != null)) {
/* 179 */ Graphics localGraphics = this.canv.getGraphics();
/* 180 */ QDRect localQDRect = this.bounds;
/* 181 */ if (localQDRect == null) localQDRect = new QDRect(this.canv.getSize());
/* 182 */ localGraphics.drawImage(this.im, 0, 0, localQDRect.getWidth(), localQDRect.getHeight(), this.canv);
/* */ }
/* */ }
/* */
/* */ static
/* */ {
/* 28 */ if ((QTSession.isCurrentOS(4)) && (QTSession.getJavaVersion() >= 65540))
/* 29 */ throw new QTRuntimeException("Unsupported on Mac OS X and Java 1.4 and higher.");
/* */ }
/* */ }
/* Location: Z:\System\Library\Java\Extensions\QTJava.zip
* Qualified Name: quicktime.app.image.ImageDrawer
* JD-Core Version: 0.6.2
*/