simplespace.html

来自「这个是java的quicktime for java 的详细使用文档」· HTML 代码 · 共 867 行 · 第 1/3 页

HTML
867
字号
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#isAppropriate(java.lang.Object)">isAppropriate</A></B>(java.lang.Object&nbsp;object)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the Object object is an appropriate member of the Space.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#memberAdded(java.lang.Object)">memberAdded</A></B>(java.lang.Object&nbsp;member)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#memberRemoved(java.lang.Object)">memberRemoved</A></B>(java.lang.Object&nbsp;member)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#removeAllControllers()">removeAllControllers</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method will remove all of the controllers that are currently attached to the Space.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#removeAllMembers()">removeAllMembers</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method will remove all of the members that are currently contained by the space.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#removeController(quicktime.app.spaces.Controller)">removeController</A></B>(<A HREF="../../../quicktime/app/spaces/Controller.html">Controller</A>&nbsp;c)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a controller that was previously added to the Space.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#removedFrom(java.lang.Object)">removedFrom</A></B>(java.lang.Object&nbsp;interest)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method is called by the specified object when the Listener object is removed from the object that is the source of the interest.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#removeMember(java.lang.Object)">removeMember</A></B>(java.lang.Object&nbsp;member)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the object is a member of the collection it is removed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#tickle(float, int)">tickle</A></B>(float&nbsp;er,       int&nbsp;time)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The Timer invokes the tickle method when the invocation constraints of the Timer are reached.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.util.Enumeration</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#tickleList()">tickleList</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an Enumeration of all of the Controllers that implement the Ticklish interface (TicklishControllers) that have been added to the Space.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#timeChanged(int)">timeChanged</A></B>(int&nbsp;newTime)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Invoked by the timer when a time condition of its time base has changed.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_quicktime.app.spaces.Collection"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface quicktime.app.spaces.<A HREF="../../../quicktime/app/spaces/Collection.html">Collection</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../quicktime/app/spaces/Collection.html#isEmpty()">isEmpty</A>, <A HREF="../../../quicktime/app/spaces/Collection.html#members()">members</A>, <A HREF="../../../quicktime/app/spaces/Collection.html#size()">size</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="controllersVec"><!-- --></A><H3>controllersVec</H3><PRE>protected java.util.Vector <B>controllersVec</B></PRE><DL><DD>This vector is used to collect the Controllers that are added to the Space</DL><HR><A NAME="containedSpaces"><!-- --></A><H3>containedSpaces</H3><PRE>protected java.util.Vector <B>containedSpaces</B></PRE><DL><DD>This vector is used to collect any Spaces that are added as members to this Space</DL><HR><A NAME="ticklers"><!-- --></A><H3>ticklers</H3><PRE>protected <A HREF="../../../quicktime/app/actions/TickleList.html">TickleList</A> <B>ticklers</B></PRE><DL><DD>This TickleList is used to collect any ticklish controllers that are added to the Space</DL><HR><A NAME="timer"><!-- --></A><H3>timer</H3><PRE>protected <A HREF="../../../quicktime/app/time/Timer.html">Timer</A> <B>timer</B></PRE><DL><DD>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</DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="SimpleSpace(quicktime.app.spaces.Protocol)"><!-- --></A><H3>SimpleSpace</H3><PRE>protected <B>SimpleSpace</B>(<A HREF="../../../quicktime/app/spaces/Protocol.html">Protocol</A>&nbsp;protocols)               throws <A HREF="../../../quicktime/QTException.html">QTException</A></PRE><DL><DD>Called by classes that extend the SimpleSpace. The sub class must pass in a Protocol object that defines the protocol (ie. the Class type of member objects) that the sub-class Space knows how to deal with. This ensure that members of a Space meet some minimal functionality. <P> 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.<DD><DL><DT><B>Parameters:</B><DD><CODE>protocols</CODE> - the Protocol that is enforced on candidate member objects of this space.<DT><B>See Also: </B><DD><A HREF="../../../quicktime/app/spaces/Protocol.html"><CODE>Protocol</CODE></A>, <A HREF="../../../quicktime/app/time/Timer.html"><CODE>Timer</CODE></A></DL></DD></DL><HR><A NAME="SimpleSpace(quicktime.app.spaces.Protocol, int, int)"><!-- --></A><H3>SimpleSpace</H3><PRE>protected <B>SimpleSpace</B>(<A HREF="../../../quicktime/app/spaces/Protocol.html">Protocol</A>&nbsp;protocols,                      int&nbsp;scale,                      int&nbsp;period)               throws <A HREF="../../../quicktime/QTException.html">QTException</A></PRE><DL><DD>Called by classes that extend the SimpleSpace. The sub class must pass in a Protocol object that defines the protocol (ie. the Class type of member objects) that the sub-class Space knows how to deal with. This ensure that members of a Space meet some minimal functionality. The constructor also provides a scale and period for the construction of the Space's Timer. This scale and period can be reset at any time using appropriate methods on the Timer class.<DD><DL><DT><B>Parameters:</B><DD><CODE>protocols</CODE> - the Protocol that is enforced on candidate member objects of this space.<DD><CODE>scale</CODE> - the scale of the Space's Timer - this may NOT be zero.<DD><CODE>period</CODE> - the period of the Space's Timer.<DT><B>See Also: </B><DD><A HREF="../../../quicktime/app/spaces/Protocol.html"><CODE>Protocol</CODE></A>, <A HREF="../../../quicktime/app/time/Timer.html"><CODE>Timer</CODE></A></DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="timeChanged(int)"><!-- --></A><H3>timeChanged</H3><PRE>public void <B>timeChanged</B>(int&nbsp;newTime)                 throws <A HREF="../../../quicktime/QTException.html">QTException</A></PRE><DL><DD>Invoked by the timer when a time condition of its time base has changed.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../quicktime/app/time/Ticklish.html#timeChanged(int)">timeChanged</A></CODE> in interface <CODE><A HREF="../../../quicktime/app/time/Ticklish.html">Ticklish</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>the</CODE> - newTime of the time base resulting from the changed time line of the timer</DL></DD></DL><HR><A NAME="tickle(float, int)"><!-- --></A><H3>tickle</H3><PRE>public boolean <B>tickle</B>(float&nbsp;er,                      int&nbsp;time)               throws <A HREF="../../../quicktime/QTException.html">QTException</A></PRE><DL><DD>The Timer invokes the tickle method when the invocation constraints of the Timer are reached. If the sub-class Space has its own tickle requirements then it should overide the tickle method, however to ensure that any ticklish controllers are tickled the overiding implementation should first call super.tickle.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../quicktime/app/time/Ticklish.html#tickle(float, int)">tickle</A></CODE> in interface <CODE><A HREF="../../../quicktime/app/time/Ticklish.html">Ticklish</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>er</CODE> - the effective rate of the Timer when the time condition matches<DD><CODE>time</CODE> - the time that the Timer invoked the tickle method.<DT><B>Returns:</B><DD>true if the Ticklish object should receive a consequent tickle, or false if the Ticklish object should not be tickled again.</DL></DD></DL><HR><A NAME="tickleList()"><!-- --></A><H3>tickleList</H3><PRE>public java.util.Enumeration <B>tickleList</B>()</PRE><DL><DD>Returns an Enumeration of all of the Controllers that implement the Ticklish interface (TicklishControllers) that have been added to the Space. These controllers are tickled each time the Space itself is tickled by its Timer.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../quicktime/app/spaces/Space.html#tickleList()">tickleList</A></CODE> in interface <CODE><A HREF="../../../quicktime/app/spaces/Space.html">Space</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>an Enumeration of Ticklish objects</DL></DD></DL><HR><A NAME="getSource()"><!-- --></A><H3>getSource</H3><PRE>public java.lang.Object <B>getSource</B>()</PRE><DL><DD>This object is the source for all of the members and controllers of the Space that implement the Listener interface. All such members and controllers will have the same source as the parent space when it is addedTo a Listener source. If the parent Space has not been added to a Listener source this returns null.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../quicktime/app/spaces/Space.html#getSource()">getSource</A></CODE> in interface <CODE><A HREF="../../../quicktime/app/spaces/Space.html">Space</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the Listener source object</DL></DD></DL><HR>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?