|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--quicktime.app.actions.TickleList
An TickleList is a list that contains Ticklish members. Each time the TickleList is tickled (it itself implements the Ticklish interface and can be a member of a TickleList) it will tickle all of its members. If the member's tickle method returns true the Ticklish member is kept active. If the tickle method returns false the member must be re-enabled for it to be tickled. A TickleList's tickle method will return false if the list is empty.
Members of a TickleList are kept in a TickleNode object which is where the active state of the node is kept. This information is only relevant for the list itself. When a Ticklish member is added to a TickleList the addMember method calls the makeTickleNode method. A subclass can define this method to make a subclass of TickleNode to store extra information about Ticklish members in a TickleList.
A singly-linked list is used to implement the TickleList. A list is used for fast iteration through the list whenever the tickle method is called. Insertion and Removal of members is of course a more expensive operation.
The TickleList also implements the TicklishController interface thus enabling it to be added to a Space as a controller for objects in that space. It implements the Collection interface to indicate that it contains a collection of objects. The TicklishController aspect of the TickleList is generally used to schedule PeriodicActions that control required aspects of the Space's members.
| Field Summary | |
protected TickleNode |
list
Deprecated. since QTJava 6.1 |
| Fields inherited from interface quicktime.app.time.Ticklish |
kScale |
| Constructor Summary | |
TickleList()
Deprecated. since QTJava 6.1 |
|
| Method Summary | |
void |
addedToSpace(Space s)
Deprecated. since QTJava 6.1 |
boolean |
addMember(java.lang.Object member)
Deprecated. since QTJava 6.1 |
TickleNode |
findNode(java.lang.Object object)
Deprecated. since QTJava 6.1 |
boolean |
hasMember(java.lang.Object object)
Deprecated. since QTJava 6.1 |
boolean |
isAppropriate(java.lang.Object object)
Deprecated. since QTJava 6.1 |
boolean |
isEmpty()
Deprecated. since QTJava 6.1 |
boolean |
isMemberActive(Ticklish member)
Deprecated. since QTJava 6.1 |
boolean |
isWholespace()
Deprecated. since QTJava 6.1 |
protected TickleNode |
makeTickleNode(Ticklish t)
Deprecated. since QTJava 6.1 |
java.util.Enumeration |
members()
Deprecated. since QTJava 6.1 |
java.util.Enumeration |
nodes()
Deprecated. since QTJava 6.1 |
void |
removedFromSpace()
Deprecated. since QTJava 6.1 |
void |
removeMember(java.lang.Object member)
Deprecated. since QTJava 6.1 |
void |
setMemberActive(Ticklish member,
boolean flag)
Deprecated. since QTJava 6.1 |
void |
setWholespace(boolean flag)
Deprecated. since QTJava 6.1 |
int |
size()
Deprecated. since QTJava 6.1 |
boolean |
tickle(float effectiveRate,
int currentTime)
Deprecated. since QTJava 6.1 |
void |
timeChanged(int newTime)
Deprecated. since QTJava 6.1 |
java.lang.String |
toString()
Deprecated. since QTJava 6.1 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected TickleNode list
| Constructor Detail |
public TickleList()
| Method Detail |
public void addedToSpace(Space s)
addedToSpace in interface Controllers - the Space being added topublic void removedFromSpace()
removedFromSpace in interface Controller
public void timeChanged(int newTime)
throws QTException
timeChanged in interface TicklishQTException
public boolean tickle(float effectiveRate,
int currentTime)
throws QTException
tickle in interface TicklisheffectiveRate - the effective rate of the Timer when the time condition matchescurrentTime - the time that the Timer invoked the tickle method.
QTExceptionpublic java.util.Enumeration members()
members in interface Collectionpublic boolean isEmpty()
isEmpty in interface Collectionpublic int size()
size in interface Collection
public boolean addMember(java.lang.Object member)
throws QTException
addMember in interface Collectionmember - the object that should be added as a member to the collection
QTExceptionprotected TickleNode makeTickleNode(Ticklish t)
t - the new Ticklish member of the list.
public void setMemberActive(Ticklish member,
boolean flag)
member - the member of the list.flag - if true the member is active and will be tickled, if false
it is inactive and it won't be tickled when the list is tickled.public boolean isMemberActive(Ticklish member)
member - a Ticklish member of this list
public boolean hasMember(java.lang.Object object)
hasMember in interface Collectionobject - the object to test for membership
public TickleNode findNode(java.lang.Object object)
public java.util.Enumeration nodes()
public void removeMember(java.lang.Object member)
removeMember in interface Collectionmember - the object to remove from the collectionpublic boolean isAppropriate(java.lang.Object object)
isAppropriate in interface Collectionobject - the object to test
DynamicCollection,
Protocolpublic boolean isWholespace()
isWholespace in interface CollectionControllerpublic void setWholespace(boolean flag)
flag - the wholespace flagCollectionControllerpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||