Package quicktime.app.anim

Source Code of quicktime.app.anim.SWController

/*     */ package quicktime.app.anim;
/*     */
/*     */ import java.awt.event.MouseEvent;
/*     */ import java.util.Enumeration;
/*     */ import quicktime.QTException;
/*     */ import quicktime.QTRuntimeException;
/*     */ import quicktime.QTSession;
/*     */ import quicktime.app.actions.MouseController;
/*     */ import quicktime.app.actions.MouseResponder;
/*     */ import quicktime.app.spaces.Space;
/*     */ import quicktime.qd.QDPoint;
/*     */ import quicktime.qd.QDRect;
/*     */
/*     */ /** @deprecated */
/*     */ public class SWController extends MouseController
/*     */ {
/*     */   private SWCompositor sd;
/*     */   private boolean isActive;
/*     */   private int flags;
/* 149 */   private QDPoint p = new QDPoint(0, 0);
/*     */
/*     */   /** @deprecated */
/*     */   public SWController(MouseResponder paramMouseResponder, boolean paramBoolean)
/*     */   {
/*  50 */     this(paramMouseResponder, paramBoolean, 10);
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public SWController(MouseResponder paramMouseResponder, boolean paramBoolean, int paramInt)
/*     */   {
/*  62 */     super(paramMouseResponder, paramBoolean);
/*  63 */     this.flags = paramInt;
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public Space getSpace()
/*     */   {
/*  79 */     return this.sd;
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   protected void setTargetSpace(Space paramSpace)
/*     */   {
/*  89 */     this.sd = ((SWCompositor)paramSpace);
/*     */   }
/*     */
/*     */   public int getFlags()
/*     */   {
/*  94 */     return this.flags;
/*     */   }
/*     */
/*     */   public void setFlags(int paramInt) {
/*  98 */     this.flags = paramInt;
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   protected void deactivateResponder()
/*     */   {
/* 109 */     this.isActive = false;
/* 110 */     super.deactivateResponder();
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   protected void responderActivated()
/*     */   {
/* 118 */     this.isActive = true;
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   protected void setTranslation()
/*     */   {
/* 132 */     SWCompositor localSWCompositor1 = this.sd;
/* 133 */     SWCompositor localSWCompositor2 = localSWCompositor1;
/* 134 */     this.xLocationOffset = 0;
/* 135 */     this.yLocationOffset = 0;
/*     */     try {
/* 137 */       while (localSWCompositor1 != null) {
/* 138 */         localSWCompositor2 = localSWCompositor1;
/* 139 */         QDRect localQDRect = localSWCompositor2.getDisplayBounds();
/* 140 */         this.xLocationOffset += localQDRect.getX();
/* 141 */         this.yLocationOffset += localQDRect.getY();
/* 142 */         localSWCompositor1 = localSWCompositor2.getParent();
/*     */       }
/*     */     } catch (QTException localQTException) {
/* 145 */       QTRuntimeException.handleOrThrow(new QTRuntimeException(localQTException), localSWCompositor2, "getDisplayBounds");
/*     */     }
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   protected Object getSelected(MouseEvent paramMouseEvent)
/*     */     throws QTException
/*     */   {
/* 160 */     QDRect localQDRect = this.sd.getDisplayBounds();
/* 161 */     this.p.setX(paramMouseEvent.getX() + localQDRect.getX());
/* 162 */     this.p.setY(paramMouseEvent.getY() + localQDRect.getY());
/*     */
/* 164 */     if (!localQDRect.inside(this.p.getX(), this.p.getY())) {
/* 165 */       return null;
/*     */     }
/* 167 */     if (isWholespace())
/*     */     {
/* 170 */       this.sd.hitTestFlag = this.flags;
/* 171 */       return this.sd.hitTest(this.p.getX(), this.p.getY());
/*     */     }
/*     */
/* 187 */     Object localObject = null;
/*     */
/* 189 */     Enumeration localEnumeration = members();
/* 190 */     while (localEnumeration.hasMoreElements()) {
/* 191 */       this.p.setX(paramMouseEvent.getX());
/* 192 */       this.p.setY(paramMouseEvent.getY());
/* 193 */       TwoDSprite localTwoDSprite = (TwoDSprite)localEnumeration.nextElement();
/* 194 */       if (localTwoDSprite.hitTest(this.flags, this.p)) {
/* 195 */         if (localObject != null) {
/* 196 */           if (localTwoDSprite.getLayer() < localObject.getLayer())
/* 197 */             localObject = localTwoDSprite;
/*     */         }
/* 199 */         else localObject = localTwoDSprite;
/*     */       }
/*     */     }
/*     */
/* 203 */     return localObject;
/*     */   }
/*     */
/*     */   static
/*     */   {
/*  37 */     if ((QTSession.isCurrentOS(4)) && (QTSession.getJavaVersion() >= 65540))
/*  38 */       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.anim.SWController
* JD-Core Version:    0.6.2
*/
TOP

Related Classes of quicktime.app.anim.SWController

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.