Package quicktime.app.actions

Source Code of quicktime.app.actions.TickleList$NodeEnumerator

/*     */ package quicktime.app.actions;
/*     */
/*     */ import java.util.Enumeration;
/*     */ import java.util.NoSuchElementException;
/*     */ import quicktime.QTException;
/*     */ import quicktime.QTRuntimeException;
/*     */ import quicktime.QTSession;
/*     */ import quicktime.app.spaces.CollectionController;
/*     */ import quicktime.app.spaces.Space;
/*     */ import quicktime.app.spaces.TicklishController;
/*     */ import quicktime.app.time.Ticklish;
/*     */
/*     */ /** @deprecated */
/*     */ public class TickleList
/*     */   implements TicklishController, CollectionController
/*     */ {
/*     */
/*     */   /** @deprecated */
/*     */   protected TickleNode list;
/*  66 */   private boolean wholespace = false;
/*     */
/*     */   /** @deprecated */
/*     */   public void addedToSpace(Space paramSpace)
/*     */   {
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public void removedFromSpace()
/*     */   {
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public synchronized void timeChanged(int paramInt)
/*     */     throws QTException
/*     */   {
/*  94 */     TickleNode localTickleNode = this.list;
/*  95 */     while (localTickleNode != null) {
/*  96 */       if (localTickleNode.active)
/*  97 */         localTickleNode.action.timeChanged(paramInt);
/*  98 */       localTickleNode = localTickleNode.next;
/*     */     }
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public synchronized boolean tickle(float paramFloat, int paramInt)
/*     */     throws QTException
/*     */   {
/* 110 */     TickleNode localTickleNode = this.list;
/* 111 */     while (localTickleNode != null) {
/* 112 */       if ((localTickleNode.active) && (!localTickleNode.action.tickle(paramFloat, paramInt)))
/* 113 */         localTickleNode.active = false;
/* 114 */       localTickleNode = localTickleNode.next;
/*     */     }
/* 116 */     return this.list != null;
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public Enumeration members()
/*     */   {
/* 126 */     return new ListEnumerator(this.list, null);
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public boolean isEmpty()
/*     */   {
/* 134 */     return this.list == null;
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public int size()
/*     */   {
/* 142 */     int i = 0;
/* 143 */     TickleNode localTickleNode = this.list;
/* 144 */     while (localTickleNode != null) {
/* 145 */       i++;
/* 146 */       localTickleNode = localTickleNode.next;
/*     */     }
/* 148 */     return i;
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public synchronized boolean addMember(Object paramObject)
/*     */     throws QTException
/*     */   {
/* 160 */     if (!isAppropriate(paramObject)) return false;
/* 161 */     if (hasMember(paramObject)) return true;
/* 162 */     Ticklish localTicklish = (Ticklish)paramObject;
/* 163 */     if (this.list == null) {
/* 164 */       this.list = makeTickleNode(localTicklish);
/*     */     } else {
/* 166 */       Object localObject = this.list;
/* 167 */       TickleNode localTickleNode = ((TickleNode)localObject).next;
/* 168 */       while (localTickleNode != null) {
/* 169 */         localObject = localTickleNode;
/* 170 */         localTickleNode = localTickleNode.next;
/*     */       }
/* 172 */       ((TickleNode)localObject).next = makeTickleNode(localTicklish);
/*     */     }
/* 174 */     return true;
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   protected TickleNode makeTickleNode(Ticklish paramTicklish)
/*     */   {
/* 186 */     return new TickleNode(paramTicklish);
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public void setMemberActive(Ticklish paramTicklish, boolean paramBoolean)
/*     */   {
/* 199 */     TickleNode localTickleNode = _findNode(paramTicklish);
/* 200 */     if (localTickleNode != null)
/* 201 */       localTickleNode.active = paramBoolean;
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public boolean isMemberActive(Ticklish paramTicklish)
/*     */   {
/* 213 */     TickleNode localTickleNode = _findNode(paramTicklish);
/* 214 */     if (localTickleNode != null) {
/* 215 */       return localTickleNode.active;
/*     */     }
/* 217 */     return false;
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public boolean hasMember(Object paramObject)
/*     */   {
/* 227 */     return _findNode(paramObject) != null;
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public TickleNode findNode(Object paramObject)
/*     */   {
/* 237 */     return _findNode(paramObject);
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public Enumeration nodes()
/*     */   {
/* 247 */     return new NodeEnumerator(this.list, null);
/*     */   }
/*     */
/*     */   private synchronized TickleNode _findNode(Object paramObject) {
/* 251 */     TickleNode localTickleNode = this.list;
/* 252 */     while (localTickleNode != null) {
/* 253 */       if (localTickleNode.action.equals(paramObject)) {
/* 254 */         return localTickleNode;
/*     */       }
/* 256 */       localTickleNode = localTickleNode.next;
/*     */     }
/* 258 */     return null;
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public synchronized void removeMember(Object paramObject)
/*     */   {
/* 267 */     if (this.list == null) return;
/* 268 */     if (this.list.action.equals(paramObject)) {
/* 269 */       this.list = this.list.next;
/* 270 */       return;
/*     */     }
/* 272 */     TickleNode localTickleNode1 = this.list;
/* 273 */     TickleNode localTickleNode2 = localTickleNode1.next;
/* 274 */     while (localTickleNode2 != null) {
/* 275 */       if (localTickleNode2.action.equals(paramObject)) {
/* 276 */         localTickleNode1.next = localTickleNode2.next;
/* 277 */         break;
/*     */       }
/* 279 */       localTickleNode2 = localTickleNode2.next;
/* 280 */       localTickleNode1 = localTickleNode1.next;
/*     */     }
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public boolean isAppropriate(Object paramObject)
/*     */   {
/* 294 */     return paramObject instanceof Ticklish;
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public boolean isWholespace()
/*     */   {
/* 304 */     return this.wholespace;
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public void setWholespace(boolean paramBoolean)
/*     */   {
/* 317 */     this.wholespace = paramBoolean;
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public String toString()
/*     */   {
/* 357 */     String str = getClass().getName() + "[";
/* 358 */     Enumeration localEnumeration = members();
/* 359 */     while (localEnumeration.hasMoreElements())
/* 360 */       str = str + localEnumeration.nextElement() + ",";
/* 361 */     str = str + "]";
/* 362 */     return str;
/*     */   }
/*     */
/*     */   static
/*     */   {
/*  47 */     if ((QTSession.isCurrentOS(4)) && (QTSession.getJavaVersion() >= 65540))
/*  48 */       throw new QTRuntimeException("Unsupported on Mac OS X and Java 1.4 and higher.");
/*     */   }
/*     */
/*     */   static class NodeEnumerator
/*     */     implements Enumeration
/*     */   {
/*     */     private TickleNode current;
/*     */
/*     */     private NodeEnumerator(TickleNode paramTickleNode)
/*     */     {
/* 338 */       this.current = paramTickleNode;
/*     */     }
/*     */
/*     */     public boolean hasMoreElements() {
/* 342 */       return this.current != null;
/*     */     }
/*     */     public Object nextElement() {
/* 345 */       if (this.current == null) throw new NoSuchElementException("TickleList");
/* 346 */       TickleNode localTickleNode = this.current;
/* 347 */       this.current = this.current.next;
/* 348 */       return localTickleNode;
/*     */     }
/*     */
/*     */     NodeEnumerator(TickleNode paramTickleNode, TickleList.1 param1)
/*     */     {
/* 336 */       this(paramTickleNode);
/*     */     }
/*     */   }
/*     */
/*     */   static class ListEnumerator
/*     */     implements Enumeration
/*     */   {
/*     */     private TickleNode current;
/*     */
/*     */     private ListEnumerator(TickleNode paramTickleNode)
/*     */     {
/* 322 */       this.current = paramTickleNode;
/*     */     }
/*     */
/*     */     public boolean hasMoreElements() {
/* 326 */       return this.current != null;
/*     */     }
/*     */     public Object nextElement() {
/* 329 */       if (this.current == null) throw new NoSuchElementException("TickleList");
/* 330 */       TickleNode localTickleNode = this.current;
/* 331 */       this.current = this.current.next;
/* 332 */       return localTickleNode.action;
/*     */     }
/*     */
/*     */     ListEnumerator(TickleNode paramTickleNode, TickleList.1 param1)
/*     */     {
/* 320 */       this(paramTickleNode);
/*     */     }
/*     */   }
/*     */ }

/* Location:           Z:\System\Library\Java\Extensions\QTJava.zip
* Qualified Name:     quicktime.app.actions.TickleList
* JD-Core Version:    0.6.2
*/
TOP

Related Classes of quicktime.app.actions.TickleList$NodeEnumerator

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.