simplespace.html

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

HTML
867
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Mon Jul 15 11:49:50 PDT 2002 --><TITLE>: Class  SimpleSpace</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/SimpleSpace.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../quicktime/app/spaces/Sequencer.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="SimpleSpace.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">quicktime.app.spaces</FONT><BR>Class  SimpleSpace</H2><PRE>java.lang.Object  |  +--<B>quicktime.app.spaces.SimpleSpace</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../quicktime/app/spaces/Collection.html">Collection</A>, <A HREF="../../../quicktime/app/spaces/DynamicCollection.html">DynamicCollection</A>, <A HREF="../../../quicktime/app/spaces/Listener.html">Listener</A>, <A HREF="../../../quicktime/app/spaces/Space.html">Space</A>, <A HREF="../../../quicktime/app/time/Ticklish.html">Ticklish</A></DD></DL><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../quicktime/app/display/GroupDrawable.html">GroupDrawable</A>, <A HREF="../../../quicktime/app/anim/SWCompositor.html">SWCompositor</A></DD></DL><HR><DL><DT>public abstract class <B>SimpleSpace</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../quicktime/app/spaces/Space.html">Space</A></DL><P>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. <UL> <LI>If the member is a Space then the contained Space will have the same source for its Listener members as the parent Space. The Space's TimeBase will be slaved to the parent Space. <LI>If the member or controller (TimeableController) implements the Timeable interface then the TimeBase of the member or controller will be slaved to the Space. <LI>If the member or controller (ListenerController) implements the Listener interface then the source of the Listener interest will be the source of the parent Space - that is all members and controllers will have the same Listener source. <LI>If the controller implements the Ticklish interface (TicklishController) it will be added to the ticklishList and the tickle and timeChanged methods of the Space will tickle and timeChange all members of this ticklishList. <LI>If the controller implements the Collection interface (CollectionController) and the isWholespace method of the controller returns true then all members that are added to the Space will also be added to the controller. It is the responsibility of the Controller to determine if the member is an appropriate member for it to control, and if so add it to its collection of objects it controls. If isWholespace is false then members must explicitly added to the controllers. When a member is removed from a Space the CollectionController will be told to remove that member form its collection of objects it controls (regardless of the isWholespace method). <LI>All Controllers that are added to a Space are considered to be active. There is no explicit way for a Controller to deactivate itself, though internally a particular implementation of the Controller interface may choose to be inactive or active. However the Space knows no such state of the Controller and thus treats all attached Controllers as active. </UL> The SimpleSpace can be used in different settings - ie. it has no predefined application for managing display (presentation) or model contexts. The QTJava library provides DisplaySpaces as extensions and concrete classes of the SimpleSpace. However applications can also use SimpleSpace as a parent class for other kinds of Spaces, such as model spaces. <P> 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.<P><DL><DT><B>See Also: </B><DD><CODE>quicktime.app.display.SWCompositor</CODE>, <A HREF="../../../quicktime/app/display/GroupDrawable.html"><CODE>GroupDrawable</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;java.util.Vector</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#containedSpaces">containedSpaces</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This vector is used to collect any Spaces that are added as members to this Space</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;java.util.Vector</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#controllersVec">controllersVec</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This vector is used to collect the Controllers that are added to the Space</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../quicktime/app/actions/TickleList.html">TickleList</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#ticklers">ticklers</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This TickleList is used to collect any ticklish controllers that are added to the Space</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../quicktime/app/time/Timer.html">Timer</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#timer">timer</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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</TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_quicktime.app.time.Ticklish"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface quicktime.app.time.<A HREF="../../../quicktime/app/time/Ticklish.html">Ticklish</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../quicktime/app/time/Ticklish.html#kScale">kScale</A></CODE></TD></TR></TABLE>&nbsp;<!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected </CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#SimpleSpace(quicktime.app.spaces.Protocol)">SimpleSpace</A></B>(<A HREF="../../../quicktime/app/spaces/Protocol.html">Protocol</A>&nbsp;protocols)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called by classes that extend the SimpleSpace.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected </CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#SimpleSpace(quicktime.app.spaces.Protocol, int, int)">SimpleSpace</A></B>(<A HREF="../../../quicktime/app/spaces/Protocol.html">Protocol</A>&nbsp;protocols,            int&nbsp;scale,            int&nbsp;period)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called by classes that extend the SimpleSpace.</TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></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#addController(quicktime.app.spaces.Controller)">addController</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;This method is used by the application to add a Controller 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#addedTo(java.lang.Object)">addedTo</A></B>(java.lang.Object&nbsp;interest)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#addMember(java.lang.Object)">addMember</A></B>(java.lang.Object&nbsp;member)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds an object to the collection.</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#controllers()">controllers</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an Enumeration of all 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>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#finalize()">finalize</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../quicktime/app/spaces/Protocol.html">Protocol</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#getProtocol()">getProtocol</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Protocol object that defines if a member 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>&nbsp;java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#getSource()">getSource</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This object is the source for all of the members and controllers of the Space that implement the Listener interface.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../quicktime/app/time/Timer.html">Timer</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#getTimer()">getTimer</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Timer of the Space.</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#hasMember(java.lang.Object)">hasMember</A></B>(java.lang.Object&nbsp;object)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the specified QTDrawable is a member of this Group.</TD></TR>

⌨️ 快捷键说明

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