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

📄 qtcanvas.html

📁 这个是java的quicktime for java 的详细使用文档
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<A NAME="setClient(quicktime.app.display.Drawable, boolean)"><!-- --></A><H3>setClient</H3><PRE>public void <B>setClient</B>(<A HREF="../../../quicktime/app/display/Drawable.html">Drawable</A>&nbsp;client,                      boolean&nbsp;layoutFlag)               throws <A HREF="../../../quicktime/QTException.html">QTException</A></PRE><DL><DD>Associates a new client, a Drawable object, with this QTCanvas.  The flag determines if awt will perform a layout and how the client will be integrated with the canvas. If the flag is false then the new client will take on the current size and position of the canvas. If the flag is true, then awt will layout the canvas again, using the initial size of the client and the resize flags to resize the canvas and its client. <P> The size of the client when this method is called is used to ascertain the best size for viewing this client's media. <P> This method can throw a number of exceptions:<BR> QTUnknownOSException the application is trying to run on a platform that is not supported by QuickTime<BR> NativeGraphicsException the native graphics environment is not initialised<BR> QTException or subclass - there was a problem within QuickTime itself in dealing with this client<DD><DL><DT><B>Parameters:</B><DD><CODE>client</CODE> - a Drawable object - if null the method will remove the client<DD><CODE>layoutFlag</CODE> - if true java.awt will re-layout the canvas, if false the client will fit into the existing state (display size, etc) of the canvas, disregarding any resize that might have occured to honour the layout flag setting with respect to the different size of the new client.</DL></DD></DL><HR><A NAME="setClient(quicktime.app.display.Drawable, quicktime.qd.QDRect)"><!-- --></A><H3>setClient</H3><PRE>public void <B>setClient</B>(<A HREF="../../../quicktime/app/display/Drawable.html">Drawable</A>&nbsp;client,                      <A HREF="../../../quicktime/qd/QDRect.html">QDRect</A>&nbsp;initialBounds)               throws <A HREF="../../../quicktime/QTException.html">QTException</A></PRE><DL><DD>Associates a new client, a Drawable object, with this QTCanvas. It will use existing  alignment and resize restrictions. <P> This method can throw a number of exceptions:<BR> QTUnknownOSException the application is trying to run on a platform that is not supported by QuickTime<BR> NativeGraphicsException the native graphics environment is not initialised<BR> QTException or subclass - there was a problem within QuickTime itself in dealing with this client<DD><DL><DT><B>Parameters:</B><DD><CODE>client</CODE> - a Drawable object - if null the method will remove the client<DD><CODE>initialBounds</CODE> - the best size of the client</DL></DD></DL><HR><A NAME="getClient()"><!-- --></A><H3>getClient</H3><PRE>public final <A HREF="../../../quicktime/app/display/Drawable.html">Drawable</A> <B>getClient</B>()</PRE><DL><DD>Returns the Drawable object currently associated with this QTCanvas.<DD><DL><DT><B>Returns:</B><DD>a Drawable object</DL></DD></DL><HR><A NAME="setAlignment(float, float)"><!-- --></A><H3>setAlignment</H3><PRE>public void <B>setAlignment</B>(float&nbsp;xAlignment,                         float&nbsp;yAlignment)</PRE><DL><DD>Set the alignment position values. The alignment values must be between 0.0 and 1.0. Values out of this range will be reset to either 0.0 or 1.0, whichever is closest to the given argument. <p> Alignment Positioning works like this: <dl>  <dt>x=0.0 y=0.0</dt>    <dd>is equivalent to a top-left position  <dt>x=1.0 y=1.0</dt>    <dd>is equivalent to a bottom-right position  <dt>x=0.5 y=0.5</dt>    <dd>is equivalent to a centered position  <dt>x=0.25 y=0.75</dt>    <dd>is equivalent to 1/4 in from the the left and 3/4 down from the top </dl> Position alignments can be varied to any degree, limited by the pixel resolution of the display surface.<DD><DL><DT><B>Parameters:</B><DD><CODE>xAlignment</CODE> - a float between 0.0 and 1.0 representing the x position alignment<DD><CODE>yAlignment</CODE> - a float between 0.0 and 1.0 representing the y position alignment</DL></DD></DL><HR><A NAME="setAlignmentX(float)"><!-- --></A><H3>setAlignmentX</H3><PRE>public final void <B>setAlignmentX</B>(float&nbsp;x)</PRE><DL><DD><DL><DT><B>See Also: </B><DD><CODE>setAlignment</CODE></DL></DD></DL><HR><A NAME="setAlignmentY(float)"><!-- --></A><H3>setAlignmentY</H3><PRE>public final void <B>setAlignmentY</B>(float&nbsp;y)</PRE><DL><DD><DL><DT><B>See Also: </B><DD><CODE>setAlignment</CODE></DL></DD></DL><HR><A NAME="getAlignmentX()"><!-- --></A><H3>getAlignmentX</H3><PRE>public float <B>getAlignmentX</B>()</PRE><DL><DD>Returns the current setting of the x position alignment being used.<DD><DL><DT><B>Overrides:</B><DD><CODE>getAlignmentX</CODE> in class <CODE>java.awt.Component</CODE></DL></DD></DL><HR><A NAME="getAlignmentY()"><!-- --></A><H3>getAlignmentY</H3><PRE>public float <B>getAlignmentY</B>()</PRE><DL><DD>Returns the current setting of the y position alignment being used.<DD><DL><DT><B>Overrides:</B><DD><CODE>getAlignmentY</CODE> in class <CODE>java.awt.Component</CODE></DL></DD></DL><HR><A NAME="setResizeFlag(int)"><!-- --></A><H3>setResizeFlag</H3><PRE>public void <B>setResizeFlag</B>(int&nbsp;rFlag)</PRE><DL><DD>Reset the resize flag and re-layout the component.<DD><DL><DT><B>Parameters:</B><DD><CODE>rFlag</CODE> - the new value for the resizeFlag</DL></DD></DL><HR><A NAME="getResizeFlag()"><!-- --></A><H3>getResizeFlag</H3><PRE>public int <B>getResizeFlag</B>()</PRE><DL><DD>Returns the current setting of the resize flag being used.<DD><DL><DT><B>Returns:</B><DD>the resize flag value</DL></DD></DL><HR><A NAME="setMinimumSize(java.awt.Dimension)"><!-- --></A><H3>setMinimumSize</H3><PRE>public void <B>setMinimumSize</B>(java.awt.Dimension&nbsp;minSize)</PRE><DL><DD>Set the minimum size of the QTCanvas. If the QTCanvas is currently smaller than the minimum size passed in, it will be adjusted to meet the new minimum size requirements, in accordance with the setting of the resizeFlag.<DD><DL><DT><B>Parameters:</B><DD><CODE>minSize</CODE> - a Dimension object</DL></DD></DL><HR><A NAME="setMinimumSize(int, int)"><!-- --></A><H3>setMinimumSize</H3><PRE>public void <B>setMinimumSize</B>(int&nbsp;width,                           int&nbsp;height)</PRE><DL><DD>Set the minimum size of the canvas.<DD><DL><DT><B>Parameters:</B><DD><CODE>width</CODE> - the minimum width<DD><CODE>height</CODE> - the minimum height</DL></DD></DL><HR><A NAME="getMinimumSize()"><!-- --></A><H3>getMinimumSize</H3><PRE>public java.awt.Dimension <B>getMinimumSize</B>()</PRE><DL><DD>Returns the minimum acceptable size of this QTCanvas object.<DD><DL><DT><B>Overrides:</B><DD><CODE>getMinimumSize</CODE> in class <CODE>java.awt.Component</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a Dimension object which defines the minimum size</DL></DD></DL><HR><A NAME="getBestSize()"><!-- --></A><H3>getBestSize</H3><PRE>public java.awt.Dimension <B>getBestSize</B>()</PRE><DL><DD>Returns the best size of the client, the size of the client when it was set to this QTCanvas, or the size if the appliction notified the QTCanvas that the clien't best size was changed. This may not be the size of the display space of the QTCanvas depending on java layout instructions and current display space available to the canvas.<DD><DL><DT><B>Returns:</B><DD>a Dimension object which details the client's known initial size<DT><B>See Also: </B><DD><CODE>clientChanged</CODE></DL></DD></DL><HR><A NAME="clientChanged(java.awt.Dimension)"><!-- --></A><H3>clientChanged</H3><PRE>public void <B>clientChanged</B>(java.awt.Dimension&nbsp;bestSize)</PRE><DL><DD>This method is used by an appliction to notify a QTCanvas that the best size of its' current client has changed. This is typically the initial or actual size of the client before any matrix transforamations have been applied to the client. <P> An application only needs to call this if the display characteristics of the client have been changed. For instance, the client is a movie and some of the visual tracks of this movie have been disabled, or a new video track was added.  Thus the movie itself has changed its best size and the application <b>must</b> use this method to notify the QTCanvas that the client's best size has changed. <P> This will not effect the display area of the QTCanvas, the application should invalidate the QTCanvas and re-layout the parent container to have this change take effect. getBestSize() returns this newly notified size. <P> In the normal operation of a QTCanvas and its client there is no need for an application to use this method.<DD><DL><DT><B>Parameters:</B><DD><CODE>bestSize</CODE> - the client's new best width and height</DL></DD></DL><HR><A NAME="clientChanged(int, int)"><!-- --></A><H3>clientChanged</H3><PRE>public void <B>clientChanged</B>(int&nbsp;bestWidth,                          int&nbsp;bestHeight)</PRE><DL><DD>This method is used by an appliction to notify a QTCanvas that the best size of its' current client has changed. This is typically the initial or actual size of the client before any matrix transforamations have been applied to the client. <P> An application only needs to call this if the display characteristics of the client have been changed. For instance, the client is a movie and some of the visual tracks of this movie have been disabled, or a new video track was added.  Thus the movie itself has changed its best size and the application <b>must</b> use this method to notify the QTCanvas that the client's best size has changed. <P> This will not effect the display area of the QTCanvas, the application should invalidate the QTCanvas and re-layout the parent container to have this change take effect.  getBestSize() returns this newly notified size. <P> In the normal operation of a QTCanvas and its client there is no need for an application to use this method.<DD><DL><DT><B>Parameters:</B><DD><CODE>bestWidth</CODE> - the client's new best width<DD><CODE>bestHeight</CODE> - the client's new actual height</DL></DD></DL><HR><A NAME="getPreferredSize()"><!-- --></A><H3>getPreferredSize</H3><PRE>public java.awt.Dimension <B>getPreferredSize</B>()</PRE><DL><DD>Returns the preferred size of the QTCanvas object. If you haven't explicitly set the preferred size of the canvas this will be the initial size of the canvas' client.<DD><DL><DT><B>Overrides:</B><DD><CODE>getPreferredSize</CODE> in class <CODE>java.awt.Component</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a Dimension object which defines the preferred size</DL></DD></DL><HR><A NAME="setPreferredSize(java.awt.Dimension)"><!-- --></A><H3>setPreferredSize</H3><PRE>public void <B>setPreferredSize</B>(java.awt.Dimension&nbsp;prefSize)</PRE><DL><DD>Sets the preferred size of the QTCanvas object.<DD><DL><DT><B>Returns:</B><DD>a Dimension object which defines the preferred size</DL></DD></DL><HR><A NAME="setPreferredSize(int, int)"><!-- --></A><H3>setPreferredSize</H3><PRE>public void <B>setPreferredSize</B>(int&nbsp;width,                             int&nbsp;height)</PRE><DL><DD>Sets the preferred size of the QTCanvas object. Passing in values of less than zero for width and height will reset the behaviour of the QTCanvas to retrieve the preferred size as the initial size of the current or new client

⌨️ 快捷键说明

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