📄 directgroup.html
字号:
<!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:47 PDT 2002 --><TITLE>: Class DirectGroup</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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DirectGroup.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS <A HREF="../../../quicktime/app/display/FullScreenWindow.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="DirectGroup.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#fields_inherited_from_class_quicktime.app.display.GroupDrawable">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">quicktime.app.display</FONT><BR>Class DirectGroup</H2><PRE>java.lang.Object | +--<A HREF="../../../quicktime/app/spaces/SimpleSpace.html">quicktime.app.spaces.SimpleSpace</A> | +--<A HREF="../../../quicktime/app/display/GroupDrawable.html">quicktime.app.display.GroupDrawable</A> | +--<B>quicktime.app.display.DirectGroup</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../quicktime/app/spaces/Collection.html">Collection</A>, <A HREF="../../../quicktime/app/display/Drawable.html">Drawable</A>, <A HREF="../../../quicktime/app/spaces/DynamicCollection.html">DynamicCollection</A>, <A HREF="../../../quicktime/app/spaces/Listener.html">Listener</A>, <A HREF="../../../quicktime/app/display/QTDisplaySpace.html">QTDisplaySpace</A>, <A HREF="../../../quicktime/app/display/QTDrawable.html">QTDrawable</A>, <A HREF="../../../quicktime/app/spaces/Space.html">Space</A>, <A HREF="../../../quicktime/app/time/Ticklish.html">Ticklish</A>, <A HREF="../../../quicktime/app/image/Transformable.html">Transformable</A></DD></DL><HR><DL><DT>public class <B>DirectGroup</B><DT>extends <A HREF="../../../quicktime/app/display/GroupDrawable.html">GroupDrawable</A></DL><P>A DirectGroup contains a set of QTDrawable objects that present their visual contents directly to the screen. <P> Items that overlap screen space will draw over each other and the front object will clip the rear object so that the rear object does not draw in the area occupied by the front object. <P> When the group is resized the group's items will not be resized or moved but clipped to the new viewing area of the DirectGroup. Doing a setMatrix on a DirectGroup will inherit the default behaviour of the GroupDrawable super class which merely repositions the group - it will not scale, rotate or skew the group or its members. As such the DirectGroup's display area reperesents a viewing area for its members and when this viewing area is changed the user will see more or less of the members that are in the DirectGroup. <P> This behaves different from the SWCompositor group - where a resize of that group will resize and scale the members of that group. <P> This behaviour of the DirectGroup allows an application to use the DirectGroup as a clipping area for its members, where the members of the group are not resized. This class can be used to implement a scrolling pane for example. For example an application may have a very large image that it wants to presents only portions of it. If the application used the GraphicsImporterDrawer (GID) as the client of the QTCanvas the image presented by the GID would be scaled to the viewing area of the QTCanvas. However if the client of the canvas was a DirectGroup and the group contained the GID then the DirectGroup would represent the viewing area of the GID. The application could define a MouseController and responder for this DirectGroup that allowed the user to click on the GID member and when dragging the mouse around change the part of the image that the user sees. Thus the GID image is not resized, and the DirectGroup acts as a clipping viewing area to only see a part of the GID member. <P> A DirectGroup can only be a top-level container object. Currently you cannot embed DirectGroups within other (parent) DirectGroups. The isAppropriate() method returns false for a potential DirectGroup member object. In this case the member won't be added, and the addMember methods will return false. If an application wanted to support this capability they should overide the isAppropriate method to allow these kinds of members.<P><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="fields_inherited_from_class_quicktime.app.display.GroupDrawable"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class quicktime.app.display.<A HREF="../../../quicktime/app/display/GroupDrawable.html">GroupDrawable</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../quicktime/app/display/GroupDrawable.html#clip">clip</A>, <A HREF="../../../quicktime/app/display/GroupDrawable.html#vec">vec</A></CODE></TD></TR></TABLE> <A NAME="fields_inherited_from_class_quicktime.app.spaces.SimpleSpace"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class quicktime.app.spaces.<A HREF="../../../quicktime/app/spaces/SimpleSpace.html">SimpleSpace</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../quicktime/app/spaces/SimpleSpace.html#containedSpaces">containedSpaces</A>, <A HREF="../../../quicktime/app/spaces/SimpleSpace.html#controllersVec">controllersVec</A>, <A HREF="../../../quicktime/app/spaces/SimpleSpace.html#ticklers">ticklers</A>, <A HREF="../../../quicktime/app/spaces/SimpleSpace.html#timer">timer</A></CODE></TD></TR></TABLE> <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> <!-- ======== 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> </CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/display/DirectGroup.html#DirectGroup(java.awt.Dimension, quicktime.qd.QDColor)">DirectGroup</A></B>(java.awt.Dimension initialSize, <A HREF="../../../quicktime/qd/QDColor.html">QDColor</A> bc)</CODE><BR> <B>Deprecated.</B> <I>since QTJava 4.0, replaced by DirectGroup</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> </CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/display/DirectGroup.html#DirectGroup(quicktime.qd.QDDimension, quicktime.qd.QDColor)">DirectGroup</A></B>(<A HREF="../../../quicktime/qd/QDDimension.html">QDDimension</A> initialSize, <A HREF="../../../quicktime/qd/QDColor.html">QDColor</A> bc)</CODE><BR> Create a new grouped drawable where the members draw directly to the screen.</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/display/DirectGroup.html#DirectGroup(quicktime.qd.QDDimension, quicktime.qd.QDColor, int, int, quicktime.app.spaces.Protocol)">DirectGroup</A></B>(<A HREF="../../../quicktime/qd/QDDimension.html">QDDimension</A> initialSize, <A HREF="../../../quicktime/qd/QDColor.html">QDColor</A> bc, int scale, int period, <A HREF="../../../quicktime/app/spaces/Protocol.html">Protocol</A> p)</CODE><BR> Create a new grouped drawable where the members draw directly to the screen.</TD></TR></TABLE> <!-- ========== 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> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/display/DirectGroup.html#addMember(java.lang.Object)">addMember</A></B>(java.lang.Object member)</CODE><BR> Add a QTDrawable object to the group with the current location of the QTDrawable.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/display/DirectGroup.html#addMember(java.lang.Object, int)">addMember</A></B>(java.lang.Object member, int layer)</CODE><BR> Add a QTDrawable object to the group based on the current location of the member and the specified layer parametre.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/display/DirectGroup.html#addMember(java.lang.Object, int, float, float)">addMember</A></B>(java.lang.Object member, int layer, float xAlign, float yAlign)</CODE><BR> Add a QTDrawable object to the group based on the provided alignment and layer parametres.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -