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

📄 qtcanvas.html

📁 这个是java的quicktime for java 的详细使用文档
💻 HTML
📖 第 1 页 / 共 5 页
字号:
                 int&nbsp;height)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the preferred size of the QTCanvas object.</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/display/QTCanvas.html#setResizeFlag(int)">setResizeFlag</A></B>(int&nbsp;rFlag)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reset the resize flag and re-layout the component.</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/display/QTCanvas.html#setSize(java.awt.Dimension)">setSize</A></B>(java.awt.Dimension&nbsp;dim)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resizes the QTCanvas object to the specified parameters.</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/display/QTCanvas.html#setSize(int, int)">setSize</A></B>(int&nbsp;width,        int&nbsp;height)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resizes the QTCanvas object, as well as the associated Drawable object.</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/display/QTCanvas.html#setVisible(boolean)">setVisible</A></B>(boolean&nbsp;b)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the visible state of the Canvas.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/display/QTCanvas.html#toString()">toString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print information about this object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../quicktime/qd/QDPoint.html">QDPoint</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/display/QTCanvas.html#translatePoint(int, int)">translatePoint</A></B>(int&nbsp;x,               int&nbsp;y)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An incoming point (typically from some kind of MouseEvent) is in coordinates that have their origin  set at the local coordinate system of the canvas.</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/display/QTCanvas.html#update(java.awt.Graphics)">update</A></B>(java.awt.Graphics&nbsp;g)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;We override the update method to call our paint method as the background colour repaint is not valid for a QTCanvas object.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.awt.Canvas"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.awt.Canvas</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>getAccessibleContext</CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.awt.Component"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.awt.Component</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, resize, resize, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, show, show, size, transferFocus, validate</CODE></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, wait, wait, wait</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="kIntegralResize"><!-- --></A><H3>kIntegralResize</H3><PRE>public static final int <B>kIntegralResize</B></PRE><DL><DD>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.)</DL><HR><A NAME="kInitialSize"><!-- --></A><H3>kInitialSize</H3><PRE>public static final int <B>kInitialSize</B></PRE><DL><DD>Use this flag if the client should revert to its initially specified size. The client can be made smaller (using an aspect setting) but can be no larger than its initial size. The QTCanvas takes this initial size as the best viewing size for its client.</DL><HR><A NAME="kFreeResize"><!-- --></A><H3>kFreeResize</H3><PRE>public static final int <B>kFreeResize</B></PRE><DL><DD>Use this flag if the client can be resized to any size >= the minimum and <= the maximum.</DL><HR><A NAME="kAspectResize"><!-- --></A><H3>kAspectResize</H3><PRE>public static final int <B>kAspectResize</B></PRE><DL><DD>Use this flag if the client can be resized to any size which preserves the initial aspect ratio.</DL><HR><A NAME="kPerformanceResize"><!-- --></A><H3>kPerformanceResize</H3><PRE>public static final int <B>kPerformanceResize</B></PRE><DL><DD>Use this flag if the client can be resized to any size which is a factor of 2 of the initial size.</DL><HR><A NAME="kHorizontalResize"><!-- --></A><H3>kHorizontalResize</H3><PRE>public static final int <B>kHorizontalResize</B></PRE><DL><DD>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. This is a good setting for QT VR content.</DL><HR><A NAME="kVerticalResize"><!-- --></A><H3>kVerticalResize</H3><PRE>public static final int <B>kVerticalResize</B></PRE><DL><DD>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.</DL><HR><A NAME="kInitialSizeNoResize"><!-- --></A><H3>kInitialSizeNoResize</H3><PRE>public static final int <B>kInitialSizeNoResize</B></PRE><DL><DD>Use this flag specify that the client cannot be resized</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="QTCanvas()"><!-- --></A><H3>QTCanvas</H3><PRE>public <B>QTCanvas</B>()</PRE><DL><DD>Constructor for creating a client-less QTCanvas. Default settings are: <dl> <dt>Resize Flag is kFreeResize <dt>xAlignment and yAlignment are both set to 0 (top left) <dt>Minimum size is (1, 1) <dt>Maximum size is (Integer.MAX_VALUE, Integer.MAX_VALUE) </dl></DL><HR><A NAME="QTCanvas(int, float, float)"><!-- --></A><H3>QTCanvas</H3><PRE>public <B>QTCanvas</B>(int&nbsp;resizeFlag,                float&nbsp;xAlignment,                float&nbsp;yAlignment)</PRE><DL><DD>Constructor for creating a client-less QTCanvas.<DD><DL><DT><B>Parameters:</B><DD><CODE>resizeFlag</CODE> - the resize control setting<DD><CODE>xAlignment</CODE> - a value between 0 and 1 that sets the position of the drawable client within the  space that AWT will give to the canvas when layed out. 0 means left, 1 means right, 0.5 means centre.<DD><CODE>yAlignment</CODE> - a value between 0 and 1 that sets the position of the drawable client within the  space that AWT will give to the canvas when layed out. 0 means top, 1 means bottom, 0.5 means centre.</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="getPort()"><!-- --></A><H3>getPort</H3><PRE>public final <A HREF="../../../quicktime/qd/QDGraphics.html">QDGraphics</A> <B>getPort</B>()                         throws <A HREF="../../../quicktime/QTUnknownOSException.html">QTUnknownOSException</A>,                                <A HREF="../../../quicktime/qd/NativeGraphicsException.html">NativeGraphicsException</A></PRE><DL><DD>This method will return a QTJava object, QDGraphics, which is a reference to  the native graphics drawing environment being used by this QTCanvas object. If the canvas is invisible it will return an offscreen QDGraphics that will never be seen.<DD><DL><DT><B>Returns:</B><DD>a QDGraphics object<DT><B>Throws:</B><DD><CODE><A HREF="../../../quicktime/QTUnknownOSException.html">QTUnknownOSException</A></CODE> - if the current operating system is unknown to QuickTime<DD><CODE>quicktime.NativeGraphicsException</CODE> - if there was a problem initialising the NativeGraphics environment</DL></DD></DL><HR><A NAME="getNGLocation()"><!-- --></A><H3>getNGLocation</H3><PRE>public final java.awt.Point <B>getNGLocation</B>()                                   throws <A HREF="../../../quicktime/QTUnknownOSException.html">QTUnknownOSException</A>,                                          <A HREF="../../../quicktime/qd/NativeGraphicsException.html">NativeGraphicsException</A></PRE><DL><DD>Returns the coordinates of a component relative to the NativeGrapics window it is currently placed within.<DD><DL><DT><B>Returns:</B><DD>a Point object representing the location of the QTCanvas in the native graphics environment</DL></DD></DL><HR><A NAME="getNativeGraphics()"><!-- --></A><H3>getNativeGraphics</H3><PRE>public final <A HREF="../../../quicktime/qd/NativeGraphics.html">NativeGraphics</A> <B>getNativeGraphics</B>()</PRE><DL><DD>Returns the NativeGrapics object that represents the Graphics Port that corresponds to the display space taken up by the QTCanvas. It may return null if there is currently no native graphics environment<DD><DL><DT><B>Returns:</B><DD>a NativeGraphics object.</DL></DD></DL><HR><A NAME="translatePoint(int, int)"><!-- --></A><H3>translatePoint</H3><PRE>public final <A HREF="../../../quicktime/qd/QDPoint.html">QDPoint</A> <B>translatePoint</B>(int&nbsp;x,                                    int&nbsp;y)                             throws <A HREF="../../../quicktime/QTUnknownOSException.html">QTUnknownOSException</A>,                                    <A HREF="../../../quicktime/qd/NativeGraphicsException.html">NativeGraphicsException</A></PRE><DL><DD>An incoming point (typically from some kind of MouseEvent) is in coordinates that have their origin  set at the local coordinate system of the canvas. This method converts those coordinates into the native graphics location that is the coordinate system of the canvas' client.<DD><DL><DT><B>Parameters:</B><DD><CODE>x</CODE> - the x location<DD><CODE>y</CODE> - the y location<DT><B>Returns:</B><DD>a QDPoint that translates the x and y into the NativeGraphics coordinate system.</DL></DD></DL><HR><A NAME="removeClient()"><!-- --></A><H3>removeClient</H3><PRE>public final void <B>removeClient</B>()</PRE><DL><DD>Removes the client from the canvas.</DL><HR>

⌨️ 快捷键说明

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