⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qtcanvas.html

📁 这个是java的quicktime for java 的详细使用文档
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!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  QTCanvas</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/QTCanvas.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/display/JQTCanvas.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="QTCanvas.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;<A HREF="#inner_classes_inherited_from_class_java.awt.Canvas">INNER</A>&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.display</FONT><BR>Class  QTCanvas</H2><PRE>java.lang.Object  |  +--java.awt.Component        |        +--java.awt.Canvas              |              +--<B>quicktime.app.display.QTCanvas</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD>javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable</DD></DL><HR><DL><DT>public class <B>QTCanvas</B><DT>extends java.awt.Canvas</DL><P>A specialized canvas which supplies access to the native graphics environment and offers expanded functionality to control its viewing or display size.  The QTCanvas object can display any object which implements the Drawable interface.  This Drawable object is set as the drawing client of the QTCanvas object. <P> The resize and alignment flags determine how the QTCanvas object acts when it has its setSize or setBounds method called. These flags allow the application to control or restrict the viewing size of a QTCanvas - generally desirable as the QuickTime client of a QTCanvas is constructed to be viewed in a particular best size or react in a desired manner when resized. The resize flags comments discuss the typically appropriate usage. If the kAnySize flag is used the QTCanvas will be resized as any other java.awt.Component. <P> The size of the QTCanvas and its Drawable client are kept synchronized. The actual size of the QTCanvas is determined by the size of its Drawable  client when it is set (which becomes its "best" viewing size),  the resize and alignement flag settings, and the size of the QTCanvas' java.awt.Container parent. The client, the resize and alignment flags determine how a QTCanvas reacts to a setBounds or setSize call - any resize flag  other than the kAnySize flag will result in the QTCanvas' actual size being arbitrated with the best viewing size of its client. Thus in many cases the calls to setSize and setBounds on a QTCanvas object are requests and may not result in the  QTCanvas actually being resized to that requested size. <P> When a QTCanvas' client is set the size of the client's current size is used by the QTCanvas to indicate that this is that client's best viewing size. By default (and an application can change this) this will also become the preferred size of the QTCanvas. This size is cached by the QTCanvas and used when it is responding to resize requests from its parent  Container (for instance, the user resizes the window the QTCanvas is in). <P> If an application changes the size of the client after it has been set - for instance a Movie client is edited and the viewing area of the movie is now different - then the application must inform the QTCanvas that the client's best size is changed, before resizing the QTCanvas itself. This ensures that the QTCanvas will resize and redraw the client correctly, avoiding unwanted scaling of the client: <pre>	// application changes the actual display size of a Movie through 	// adding a video track to a movie that only had a sound track	// this means that the movie client has now a best size that 	// that is different when it was originally set as the client of this QTCanvas	myQTCanvas.clientChanged (r.getWidth(), r.getHeight());	myQTCanvas.invalidate();	 	//resize the QTCanvas' parent container so that the changed viewing conditions of the	//client will be seen.	//pack() is appropriate, as is getParent().setSize(), or getParent().setBounds()	//The application could also just validate the parent if the parent should not change size </pre> <P> Once the application has notified the canvas that the client's best viewing size has changed the QTCanvas will correctly respond to the any new sizes that are given to it by it parent's layout manager or resizing actions. <P> In most interactions between a QTCanvas and its client this explicit resizing of the client is not required as all of the Drawable clients are able to scale themselves appropriately to  a different display size. It is only required when the client's size itself has changed.<P><DL><DT><B>See Also: </B><DD><A HREF="../../../quicktime/app/display/Drawable.html"><CODE>Drawable</CODE></A>, <A HREF="../../../serialized-form.html#quicktime.app.display.QTCanvas">Serialized Form</A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><A NAME="inner_classes_inherited_from_class_java.awt.Canvas"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Inner classes inherited from class java.awt.Canvas</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>java.awt.Canvas.AccessibleAWTCanvas</CODE></TD></TR></TABLE>&nbsp;<A NAME="inner_classes_inherited_from_class_java.awt.Component"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Inner classes inherited from class java.awt.Component</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>java.awt.Component.AccessibleAWTComponent</CODE></TD></TR></TABLE>&nbsp;<!-- =========== 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>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/display/QTCanvas.html#kAspectResize">kAspectResize</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use this flag if the client can be resized to any size which preserves the initial aspect ratio.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/display/QTCanvas.html#kFreeResize">kFreeResize</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use this flag if the client can be resized to any size >= the minimum and <= the maximum.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/display/QTCanvas.html#kHorizontalResize">kHorizontalResize</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use this flag to allow the client's horizontal aspect to be any size, but the vertical axis will be the intial size of smaller.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/display/QTCanvas.html#kInitialSize">kInitialSize</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use this flag if the client should revert to its initially specified size.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/display/QTCanvas.html#kInitialSizeNoResize">kInitialSizeNoResize</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use this flag specify that the client cannot be resized</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/display/QTCanvas.html#kIntegralResize">kIntegralResize</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use this flag if the client should maintain the aspect size of its original dimensions but grow bigger by integral increments (2x, 3x, 4x, etc.)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/display/QTCanvas.html#kPerformanceResize">kPerformanceResize</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use this flag if the client can be resized to any size which is a factor of 2 of the initial size.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/display/QTCanvas.html#kVerticalResize">kVerticalResize</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use this flag to allow the client's vertical aspect to be any size, but the horizontal axis will be the intial size of smaller.</TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_java.awt.Component"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class java.awt.Component</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT</CODE></TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_java.awt.image.ImageObserver"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface java.awt.image.ImageObserver</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH</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><CODE><B><A HREF="../../../quicktime/app/display/QTCanvas.html#QTCanvas()">QTCanvas</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor for creating a client-less QTCanvas.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../quicktime/app/display/QTCanvas.html#QTCanvas(int, float, float)">QTCanvas</A></B>(int&nbsp;resizeFlag,         float&nbsp;xAlignment,         float&nbsp;yAlignment)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor for creating a client-less QTCanvas.</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">

⌨️ 快捷键说明

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