/* */ package quicktime.app.anim;
/* */
/* */ import java.util.Enumeration;
/* */ import java.util.Hashtable;
/* */ import quicktime.QTException;
/* */ import quicktime.QTRuntimeException;
/* */ import quicktime.QTSession;
/* */ import quicktime.app.display.Layerable;
/* */ import quicktime.app.image.Compositable;
/* */ import quicktime.app.image.ImageSpec;
/* */ import quicktime.app.image.Transformable;
/* */ import quicktime.app.spaces.Protocol;
/* */ import quicktime.qd.QDColor;
/* */ import quicktime.qd.QDGraphics;
/* */ import quicktime.std.image.GraphicsMode;
/* */ import quicktime.std.image.Matrix;
/* */
/* */ /** @deprecated */
/* */ public class Compositor extends SWCompositor
/* */ {
/* 45 */ private static Protocol defaultProtocol = makeP();
/* */
/* */ /** @deprecated */
/* 137 */ protected Hashtable membersTable = new Hashtable();
/* */
/* */ /** @deprecated */
/* 148 */ protected Hashtable spritesTable = new Hashtable();
/* */
/* */ private static Protocol makeP()
/* */ {
/* */ try
/* */ {
/* 49 */ return new Protocol(Class.forName("quicktime.app.image.ImageSpec"));
/* */ } catch (ClassNotFoundException localClassNotFoundException) {
/* 51 */ throw new QTRuntimeException(localClassNotFoundException.getMessage());
/* */ }
/* */ }
/* */
/* */ /** @deprecated */
/* */ public Compositor(QDGraphics paramQDGraphics, QDColor paramQDColor)
/* */ throws QTException
/* */ {
/* 65 */ this(paramQDGraphics, paramQDColor, null, 10, 1, defaultProtocol);
/* */ }
/* */
/* */ /** @deprecated */
/* */ public Compositor(QDGraphics paramQDGraphics1, QDColor paramQDColor, QDGraphics paramQDGraphics2)
/* */ throws QTException
/* */ {
/* 79 */ this(paramQDGraphics1, paramQDColor, paramQDGraphics2, 10, 1, defaultProtocol);
/* */ }
/* */
/* */ /** @deprecated */
/* */ public Compositor(QDGraphics paramQDGraphics, QDColor paramQDColor, int paramInt1, int paramInt2)
/* */ throws QTException
/* */ {
/* 92 */ this(paramQDGraphics, paramQDColor, null, paramInt1, paramInt2, defaultProtocol);
/* */ }
/* */
/* */ /** @deprecated */
/* */ public Compositor(QDGraphics paramQDGraphics1, QDColor paramQDColor, QDGraphics paramQDGraphics2, int paramInt1, int paramInt2)
/* */ throws QTException
/* */ {
/* 108 */ this(paramQDGraphics1, paramQDColor, paramQDGraphics2, paramInt1, paramInt2, defaultProtocol);
/* */ }
/* */
/* */ /** @deprecated */
/* */ protected Compositor(QDGraphics paramQDGraphics1, QDColor paramQDColor, QDGraphics paramQDGraphics2, int paramInt1, int paramInt2, Protocol paramProtocol)
/* */ throws QTException
/* */ {
/* 124 */ super(paramQDGraphics1, paramQDColor, paramQDGraphics2, paramInt1, paramInt2, paramProtocol);
/* */ }
/* */
/* */ /** @deprecated */
/* */ public Enumeration members()
/* */ {
/* 158 */ return this.membersTable.keys();
/* */ }
/* */
/* */ /** @deprecated */
/* */ public Enumeration sprites()
/* */ {
/* 168 */ return this.spritesTable.keys();
/* */ }
/* */
/* */ /** @deprecated */
/* */ public boolean isEmpty()
/* */ {
/* 175 */ return this.membersTable.isEmpty();
/* */ }
/* */
/* */ /** @deprecated */
/* */ public TwoDSprite getMemberSprite(Object paramObject)
/* */ {
/* 185 */ if (((paramObject instanceof TwoDSprite)) &&
/* 186 */ (this.spritesTable.containsKey(paramObject))) {
/* 187 */ return (TwoDSprite)paramObject;
/* */ }
/* 189 */ Object localObject = this.membersTable.get(paramObject);
/* 190 */ return localObject != null ? (TwoDSprite)localObject : null;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public Object getSpriteMember(TwoDSprite paramTwoDSprite)
/* */ {
/* 201 */ return this.spritesTable.get(paramTwoDSprite);
/* */ }
/* */
/* */ /** @deprecated */
/* */ public boolean addMember(Object paramObject)
/* */ throws QTException
/* */ {
/* 214 */ int i = 1;
/* 215 */ if ((paramObject instanceof Layerable))
/* 216 */ i = ((Layerable)paramObject).getLayer();
/* 217 */ boolean bool = true;
/* 218 */ if ((paramObject instanceof TwoDSprite))
/* 219 */ bool = ((TwoDSprite)paramObject).getVisible();
/* 220 */ else if ((paramObject instanceof TwoDSpriteInfo))
/* 221 */ bool = ((TwoDSpriteInfo)paramObject).getVisible();
/* 222 */ return addMember(paramObject, i, bool);
/* */ }
/* */
/* */ /** @deprecated */
/* */ public boolean addMember(Object paramObject, int paramInt)
/* */ throws QTException
/* */ {
/* 235 */ boolean bool = true;
/* 236 */ if ((paramObject instanceof TwoDSprite))
/* 237 */ bool = ((TwoDSprite)paramObject).getVisible();
/* 238 */ else if ((paramObject instanceof TwoDSpriteInfo))
/* 239 */ bool = ((TwoDSpriteInfo)paramObject).getVisible();
/* 240 */ return addMember(paramObject, paramInt, bool);
/* */ }
/* */
/* */ /** @deprecated */
/* */ public boolean addMember(Object paramObject, int paramInt, boolean paramBoolean)
/* */ throws QTException
/* */ {
/* 252 */ if (!isAppropriate(paramObject)) return false;
/* 253 */ if (hasMember(paramObject)) return true;
/* */
/* 255 */ TwoDSprite localTwoDSprite = null;
/* 256 */ if ((paramObject instanceof TwoDSprite)) {
/* 257 */ localTwoDSprite = (TwoDSprite)paramObject;
/* 258 */ localTwoDSprite.setLayer(paramInt);
/* 259 */ localTwoDSprite.setVisible(paramBoolean);
/* */ } else {
/* 261 */ ImageSpec localImageSpec = (ImageSpec)paramObject;
/* */
/* 263 */ GraphicsMode localGraphicsMode = null;
/* 264 */ if ((paramObject instanceof Compositable))
/* 265 */ localGraphicsMode = ((Compositable)paramObject).getGraphicsMode();
/* */ Matrix localMatrix;
/* 267 */ if ((paramObject instanceof Transformable))
/* 268 */ localMatrix = ((Transformable)paramObject).getMatrix();
/* */ else
/* 270 */ localMatrix = new Matrix();
/* 271 */ localTwoDSprite = new TwoDSprite(localImageSpec, localMatrix, paramBoolean, paramInt, localGraphicsMode);
/* */ }
/* 273 */ this.membersTable.put(paramObject, localTwoDSprite);
/* 274 */ this.spritesTable.put(localTwoDSprite, paramObject);
/* 275 */ postProcessAdd(paramObject, localTwoDSprite);
/* */
/* 277 */ return true;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public int size()
/* */ {
/* 286 */ return this.membersTable.size();
/* */ }
/* */
/* */ /** @deprecated */
/* */ public int getFrontLayer()
/* */ throws QTException
/* */ {
/* 295 */ Enumeration localEnumeration = sprites();
/* 296 */ int i = 2147483647;
/* 297 */ while (localEnumeration.hasMoreElements()) {
/* 298 */ TwoDSprite localTwoDSprite = (TwoDSprite)localEnumeration.nextElement();
/* 299 */ int j = localTwoDSprite.getLayer();
/* 300 */ if (j < i)
/* 301 */ i = j;
/* */ }
/* 303 */ return i;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public int getBackLayer()
/* */ throws QTException
/* */ {
/* 312 */ Enumeration localEnumeration = sprites();
/* 313 */ int i = -2147483648;
/* 314 */ while (localEnumeration.hasMoreElements()) {
/* 315 */ TwoDSprite localTwoDSprite = (TwoDSprite)localEnumeration.nextElement();
/* 316 */ int j = localTwoDSprite.getLayer();
/* 317 */ if (j > i)
/* 318 */ i = j;
/* */ }
/* 320 */ return i;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public void removeMember(Object paramObject)
/* */ throws QTException
/* */ {
/* 331 */ if (this.membersTable.containsKey(paramObject)) {
/* 332 */ TwoDSprite localTwoDSprite = (TwoDSprite)this.membersTable.remove(paramObject);
/* 333 */ this.spritesTable.remove(localTwoDSprite);
/* 334 */ postProcessRemove(paramObject, localTwoDSprite);
/* */ }
/* */ }
/* */
/* */ static
/* */ {
/* 40 */ if ((QTSession.isCurrentOS(4)) && (QTSession.getJavaVersion() >= 65540))
/* 41 */ 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.Compositor
* JD-Core Version: 0.6.2
*/