graphicsconfiguration.html
来自「API資料大全」· HTML 代码 · 共 497 行 · 第 1/2 页
HTML
497 行
</TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= 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="GraphicsConfiguration()"><!-- --></A><H3>GraphicsConfiguration</H3><PRE>protected <B>GraphicsConfiguration</B>()</PRE><DL><DD>This is an abstract class that cannot be instantiated directly. Instances must be obtained from a suitable factory or query method.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/awt/GraphicsDevice.html#getConfigurations()"><CODE>GraphicsDevice.getConfigurations()</CODE></A>, <A HREF="../../java/awt/GraphicsDevice.html#getDefaultConfiguration()"><CODE>GraphicsDevice.getDefaultConfiguration()</CODE></A>, <A HREF="../../java/awt/GraphicsDevice.html#getBestConfiguration(java.awt.GraphicsConfigTemplate)"><CODE>GraphicsDevice.getBestConfiguration(java.awt.GraphicsConfigTemplate)</CODE></A>, <A HREF="../../java/awt/Graphics2D.html#getDeviceConfiguration()"><CODE>Graphics2D.getDeviceConfiguration()</CODE></A></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="getDevice()"><!-- --></A><H3>getDevice</H3><PRE>public abstract <A HREF="../../java/awt/GraphicsDevice.html">GraphicsDevice</A> <B>getDevice</B>()</PRE><DL><DD>Returns the <A HREF="../../java/awt/GraphicsDevice.html"><CODE>GraphicsDevice</CODE></A> associated with this <code>GraphicsConfiguration</code>.<DD><DL><DT><B>Returns:</B><DD>a <code>GraphicsDevice</code> object that is associated with this <code>GraphicsConfiguration</code>.</DL></DD></DL><HR><A NAME="createCompatibleImage(int, int)"><!-- --></A><H3>createCompatibleImage</H3><PRE>public abstract <A HREF="../../java/awt/image/BufferedImage.html">BufferedImage</A> <B>createCompatibleImage</B>(int width, int height)</PRE><DL><DD>Returns a <A HREF="../../java/awt/image/BufferedImage.html"><CODE>BufferedImage</CODE></A> with a data layout and color model compatible with this <code>GraphicsConfiguration</code>. This method has nothing to do with memory-mapping a device. The returned <code>BufferedImage</code> has a layout and color model that is closest to this native device configuration and can therefore be optimally blitted to this device.<DD><DL><DT><B>Parameters:</B><DD><CODE>width</CODE> - the width of the returned <code>BufferedImage</code><DD><CODE>height</CODE> - the height of the returned <code>BufferedImage</code><DT><B>Returns:</B><DD>a <code>BufferedImage</code> whose data layout and color model is compatible with this <code>GraphicsConfiguration</code>.</DL></DD></DL><HR><A NAME="createCompatibleImage(int, int, int)"><!-- --></A><H3>createCompatibleImage</H3><PRE>public abstract <A HREF="../../java/awt/image/BufferedImage.html">BufferedImage</A> <B>createCompatibleImage</B>(int width, int height, int transparency)</PRE><DL><DD>Returns a <code>BufferedImage</code> that supports the specified transparency and has a data layout and color model compatible with this <code>GraphicsConfiguration</code>. This method has nothing to do with memory-mapping a device. The returned <code>BufferedImage</code> has a layout and color model that can be optimally blitted to a device with this <code>GraphicsConfiguration</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>width</CODE> - the width of the returned <code>BufferedImage</code><DD><CODE>height</CODE> - the height of the returned <code>BufferedImage</code><DD><CODE>transparency</CODE> - the specified transparency mode<DT><B>Returns:</B><DD>a <code>BufferedImage</code> whose data layout and color model is compatible with this <code>GraphicsConfiguration</code> and also supports the specified transparency.<DT><B>See Also: </B><DD><A HREF="../../java/awt/Transparency.html#OPAQUE"><CODE>Transparency.OPAQUE</CODE></A>, <A HREF="../../java/awt/Transparency.html#BITMASK"><CODE>Transparency.BITMASK</CODE></A>, <A HREF="../../java/awt/Transparency.html#TRANSLUCENT"><CODE>Transparency.TRANSLUCENT</CODE></A></DL></DD></DL><HR><A NAME="getColorModel()"><!-- --></A><H3>getColorModel</H3><PRE>public abstract <A HREF="../../java/awt/image/ColorModel.html">ColorModel</A> <B>getColorModel</B>()</PRE><DL><DD>Returns the <A HREF="../../java/awt/image/ColorModel.html"><CODE>ColorModel</CODE></A> associated with this <code>GraphicsConfiguration</code>.<DD><DL><DT><B>Returns:</B><DD>a <code>ColorModel</code> object that is associated with this <code>GraphicsConfiguration</code>.</DL></DD></DL><HR><A NAME="getColorModel(int)"><!-- --></A><H3>getColorModel</H3><PRE>public abstract <A HREF="../../java/awt/image/ColorModel.html">ColorModel</A> <B>getColorModel</B>(int transparency)</PRE><DL><DD>Returns the <code>ColorModel</code> associated with this <code>GraphicsConfiguration</code> that supports the specified transparency.<DD><DL><DT><B>Parameters:</B><DD><CODE>transparency</CODE> - the specified transparency mode<DT><B>Returns:</B><DD>a <code>ColorModel</code> object that is associated with this <code>GraphicsConfiguration</code> and supports the specified transparency.</DL></DD></DL><HR><A NAME="getDefaultTransform()"><!-- --></A><H3>getDefaultTransform</H3><PRE>public abstract <A HREF="../../java/awt/geom/AffineTransform.html">AffineTransform</A> <B>getDefaultTransform</B>()</PRE><DL><DD>Returns the default <A HREF="../../java/awt/geom/AffineTransform.html"><CODE>AffineTransform</CODE></A> for this <code>GraphicsConfiguration</code>. This <code>AffineTransform</code> is typically the Identity transform for most normal screens. The default <code>AffineTransform</code> maps coordinates onto the device such that 72 user space coordinate units measure approximately 1 inch in device space. The normalizing transform can be used to make this mapping more exact. Coordinates in the coordinate space defined by the default <code>AffineTransform</code> for screen and printer devices have the origin in the upper left-hand corner of the target region of the device, with X coordinates increasing to the right and Y coordinates increasing downwards. For image buffers not associated with a device, such as those not created by <code>createCompatibleImage</code>, this <code>AffineTransform</code> is the Identity transform.<DD><DL><DT><B>Returns:</B><DD>the default <code>AffineTransform</code> for this <code>GraphicsConfiguration</code>.</DL></DD></DL><HR><A NAME="getNormalizingTransform()"><!-- --></A><H3>getNormalizingTransform</H3><PRE>public abstract <A HREF="../../java/awt/geom/AffineTransform.html">AffineTransform</A> <B>getNormalizingTransform</B>()</PRE><DL><DD>Returns a <code>AffineTransform</code> that can be concatenated with the default <code>AffineTransform</code> of a <code>GraphicsConfiguration</code> so that 72 units in user space equals 1 inch in device space. <p> For a particular <A HREF="../../java/awt/Graphics2D.html"><CODE>Graphics2D</CODE></A>, g, one can reset the transformation to create such a mapping by using the following pseudocode: <pre> GraphicsConfiguration gc = g.getGraphicsConfiguration(); g.setTransform(gc.getDefaultTransform()); g.transform(gc.getNormalizingTransform()); </pre> Note that sometimes this <code>AffineTransform</code> is identity, such as for printers or metafile output, and that this <code>AffineTransform</code> is only as accurate as the information supplied by the underlying system. For image buffers not associated with a device, such as those not created by <code>createCompatibleImage</code>, this <code>AffineTransform</code> is the Identity transform since there is no valid distance measurement.<DD><DL><DT><B>Returns:</B><DD>an <code>AffineTransform</code> to concatenate to the default <code>AffineTransform</code> so that 72 units in user space is mapped to 1 inch in device space.</DL></DD></DL><HR><A NAME="getBounds()"><!-- --></A><H3>getBounds</H3><PRE>public abstract <A HREF="../../java/awt/Rectangle.html">Rectangle</A> <B>getBounds</B>()</PRE><DL><DD>Returns the bounds of the <code>GraphicsConfiguration</code> in the device coordinates. In a multi-screen environment with a virtual device, the bounds can have negative X or Y origins.<DD><DL><DT><B>Returns:</B><DD>the bounds of the area covered by this <code>GraphicsConfiguration</code>.<DT><B>Since: </B><DD>1.3</DD></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_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/GraphicsConfiguration.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-files/index-1.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><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../java/awt/GraphicsConfigTemplate.html"><B>PREV CLASS</B></A> <A HREF="../../java/awt/GraphicsDevice.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="GraphicsConfiguration.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <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><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?