|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--quicktime.app.spaces.SimpleSpace
SimpleSpace provides a default reference implementation of the Space interface. The following actions are taken by the SimpleSpace class when members or controllers are added to the Space.
The SimpleSpace has no knowledge or implementation of the type of collection that is used to hold the collection of members. It is a delegated responsibility of the subclass to implement the Collection methods. There are two protected methods that the subclass should call after they have successfully added or removed a member - memberAdded and memberRemoved respectively. These methods ensure the behaviour of members as outlined.
quicktime.app.display.SWCompositor,
GroupDrawable| Field Summary | |
protected java.util.Vector |
containedSpaces
This vector is used to collect any Spaces that are added as members to this Space |
protected java.util.Vector |
controllersVec
This vector is used to collect the Controllers that are added to the Space |
protected TickleList |
ticklers
This TickleList is used to collect any ticklish controllers that are added to the Space |
protected < |
timer
This is the Timer that both provides a TimeBase for the Space and tickles the Space based on the scale and period of the Timer |
| Fields inherited from interface quicktime.app.time.Ticklish |
kScale |
| Constructor Summary | |
protected |
SimpleSpace(Protocol protocols)
Called by classes that extend the SimpleSpace. |
protected |
SimpleSpace(Protocol protocols,
int scale,
int period)
Called by classes that extend the SimpleSpace. |
| Method Summary | |
void |
addController(Controller c)
This method is used by the application to add a Controller to the Space. |
void |
addedTo(java.lang.Object interest)
This method is called by some kind of container object when the Listener is added to the object that is the source of the interest. |
abstract boolean |
addMember(java.lang.Object member)
Adds an object to the collection. |
java.util.Enumeration |
controllers()
Returns an Enumeration of all Controllers that are currently attached to the Space. |
protected void |
finalize()
|
Protocol |
getProtocol()
Returns the Protocol object that defines if a member is an appropriate member of the Space. |
java.lang.Object |
getSource()
This object is the source for all of the members and controllers of the Space that implement the Listener interface. |
< |
getTimer()
Returns the Timer of the Space. |
boolean |
hasMember(java.lang.Object object)
Returns true if the specified QTDrawable is a member of this Group. |
boolean |
isAppropriate(java.lang.Object object)
Returns true if the Object object is an appropriate member of the Space. |
protected void |
memberAdded(java.lang.Object member)
When the sub-class defines the addMember method and has added the member to its collection it should call memberAdded to ensure that the member roles as defined within the Space are correctly established. |
protected void |
memberRemoved(java.lang.Object member)
When the sub-class defines the removeMember method and has removed the member from its collection it should call memberRemoved to ensure that the member roles as defined within the Space are correctly maintained. |
void |
removeAllControllers()
This method will remove all of the controllers that are currently attached to the Space. |
void |
removeAllMembers()
This method will remove all of the members that are currently contained by the space. |
void |
removeController(Controller c)
Removes a controller that was previously added to the Space. |
void |
removedFrom(java.lang.Object interest)
This method is called by the specified object when the Listener object is removed from the object that is the source of the interest. |
abstract void |
removeMember(java.lang.Object member)
If the object is a member of the collection it is removed. |
boolean |
tickle(float er,
int time)
The Timer invokes the tickle method when the invocation constraints of the Timer are reached. |
java.util.Enumeration |
tickleList()
Returns an Enumeration of all of the Controllers that implement the Ticklish interface (TicklishControllers) that have been added to the Space. |
void |
timeChanged(int newTime)
Invoked by the timer when a time condition of its time base has changed. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface quicktime.app.spaces.Collection |
isEmpty, members, size |
| Field Detail |
protected java.util.Vector controllersVec
protected java.util.Vector containedSpaces
protected TickleList ticklers
protected <>Timer timer
| Constructor Detail |
protected SimpleSpace(Protocol protocols)
throws QTException
This constructor does not create a Timer, the subclass must create a Timer in its constructor. This is provided so that subclasses can customise the Timer.
protocols - the Protocol that is enforced on candidate member objects of this space.Protocol,
Timer
protected SimpleSpace(Protocol protocols,
int scale,
int period)
throws QTException
protocols - the Protocol that is enforced on candidate member objects of this space.scale - the scale of the Space's Timer - this may NOT be zero.period - the period of the Space's Timer.Protocol,
Timer| Method Detail |
public void timeChanged(int newTime)
throws QTException
timeChanged in interface Ticklishthe - newTime of the time base resulting from the changed time line
of the timer
public boolean tickle(float er,
int time)
throws QTException
tickle in interface Ticklisher - the effective rate of the Timer when the time condition matchestime - the time that the Timer invoked the tickle method.public java.util.Enumeration tickleList()
tickleList in interface Spacepublic java.lang.Object getSource()
getSource in interface Spacepublic Protocol getProtocol()
getProtocol in interface DynamicCollectionpublic boolean isAppropriate(java.lang.Object object)
isAppropriate in interface Collectionobject - the Object to testpublic boolean hasMember(java.lang.Object object)
hasMember in interface Collectionpublic void addedTo(java.lang.Object interest)
addedTo in interface Listenersource - the object that is to be the source of interest for the
the Listener object.public void removedFrom(java.lang.Object interest)
removedFrom in interface Listenersource - the object that is to be the source of interest for the
the Listener object.
public void addController(Controller c)
throws QTException
addController in interface Spacec - the Controller to add to the Space.
public void removeController(Controller c)
throws QTException
removeController in interface Spacec - the Controller to remove from the Space.public java.util.Enumeration controllers()
controllers in interface Spacepublic <>Timer getTimer()
getTimer in interface Space
public abstract boolean addMember(java.lang.Object member)
throws QTException
addMember in interface Collectionmember - the object that should be added as a member to the collection
public abstract void removeMember(java.lang.Object member)
throws QTException
removeMember in interface Collectionmember - the object to remove from the collection
protected void memberAdded(java.lang.Object member)
throws QTException
member - the object that has been added to the Space.
protected void memberRemoved(java.lang.Object member)
throws QTException
member - the object that has been added to the Space.
public void removeAllControllers()
throws QTException
public void removeAllMembers()
throws QTException
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||