rectangularshape.html
来自「API資料大全」· HTML 代码 · 共 918 行 · 第 1/3 页
HTML
918 行
area.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD><code>true</code> if the <code>RectangularShape</code> is empty; <code>false</code> otherwise.</DL></DD></DL><HR><A NAME="setFrame(double, double, double, double)"><!-- --></A><H3>setFrame</H3><PRE>public abstract void <B>setFrame</B>(double x, double y, double w, double h)</PRE><DL><DD>Sets the location and size of the framing rectangle of this <code>Shape</code> to the specified rectangular values. The framing rectangle is used by the subclasses of <code>RectangularShape</code> to define their geometry.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>x, y</CODE> - the coordinates of the upper-left corner of the specified rectangular shape<DD><CODE>w</CODE> - the width of the specified rectangular shape<DD><CODE>h</CODE> - the height of the specified rectangular shape</DL></DD></DL><HR><A NAME="setFrame(java.awt.geom.Point2D, java.awt.geom.Dimension2D)"><!-- --></A><H3>setFrame</H3><PRE>public void <B>setFrame</B>(<A HREF="../../../java/awt/geom/Point2D.html">Point2D</A> loc, <A HREF="../../../java/awt/geom/Dimension2D.html">Dimension2D</A> size)</PRE><DL><DD>Sets the location and size of the framing rectangle of this <code>Shape</code> to the specified <A HREF="../../../java/awt/geom/Point2D.html"><CODE>Point2D</CODE></A> and <A HREF="../../../java/awt/geom/Dimension2D.html"><CODE>Dimension2D</CODE></A>, respectively. The framing rectangle is used by the subclasses of <code>RectangularShape</code> to define their geometry.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>loc</CODE> - the specified <code>Point2D</code><DD><CODE>size</CODE> - the specified <code>Dimension2D</code></DL></DD></DL><HR><A NAME="setFrame(java.awt.geom.Rectangle2D)"><!-- --></A><H3>setFrame</H3><PRE>public void <B>setFrame</B>(<A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> r)</PRE><DL><DD>Sets the framing rectangle of this <code>Shape</code> to be the specified <code>Rectangle2D</code>. The framing rectangle is used by the subclasses of <code>RectangularShape</code> to define their geometry.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - the specified <code>Rectangle2D</code></DL></DD></DL><HR><A NAME="setFrameFromDiagonal(double, double, double, double)"><!-- --></A><H3>setFrameFromDiagonal</H3><PRE>public void <B>setFrameFromDiagonal</B>(double x1, double y1, double x2, double y2)</PRE><DL><DD>Sets the diagonal of the framing rectangle of this <code>Shape</code> based on the two specified coordinates. The framing rectangle is used by the subclasses of <code>RectangularShape</code> to define their geometry.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>x1, y1</CODE> - the first specified coordinates<DD><CODE>x2, y2</CODE> - the second specified coordinates</DL></DD></DL><HR><A NAME="setFrameFromDiagonal(java.awt.geom.Point2D, java.awt.geom.Point2D)"><!-- --></A><H3>setFrameFromDiagonal</H3><PRE>public void <B>setFrameFromDiagonal</B>(<A HREF="../../../java/awt/geom/Point2D.html">Point2D</A> p1, <A HREF="../../../java/awt/geom/Point2D.html">Point2D</A> p2)</PRE><DL><DD>Sets the diagonal of the framing rectangle of this <code>Shape</code> based on two specified <code>Point2D</code> objects. The framing rectangle is used by the subclasses of <code>RectangularShape</code> to define their geometry.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>p1, p2</CODE> - the two specified <code>Point2D</code> objects</DL></DD></DL><HR><A NAME="setFrameFromCenter(double, double, double, double)"><!-- --></A><H3>setFrameFromCenter</H3><PRE>public void <B>setFrameFromCenter</B>(double centerX, double centerY, double cornerX, double cornerY)</PRE><DL><DD>Sets the framing rectangle of this <code>Shape</code> based on the specified center point coordinates and corner point coordinates. The framing rectangle is used by the subclasses of <code>RectangularShape</code> to define their geometry.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>centerX, centerY</CODE> - the center point coordinates<DD><CODE>cornerX, cornerY</CODE> - the corner point coordinates</DL></DD></DL><HR><A NAME="setFrameFromCenter(java.awt.geom.Point2D, java.awt.geom.Point2D)"><!-- --></A><H3>setFrameFromCenter</H3><PRE>public void <B>setFrameFromCenter</B>(<A HREF="../../../java/awt/geom/Point2D.html">Point2D</A> center, <A HREF="../../../java/awt/geom/Point2D.html">Point2D</A> corner)</PRE><DL><DD>Sets the framing rectangle of this <code>Shape</code> based on a specified center <code>Point2D</code> and corner <code>Point2D</code>. The framing rectangle is used by the subclasses of <code>RectangularShape</code> to define their geometry.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>center</CODE> - the specified center <code>Point2D</code><DD><CODE>corner</CODE> - the specified corner <code>Point2D</code></DL></DD></DL><HR><A NAME="contains(java.awt.geom.Point2D)"><!-- --></A><H3>contains</H3><PRE>public boolean <B>contains</B>(<A HREF="../../../java/awt/geom/Point2D.html">Point2D</A> p)</PRE><DL><DD>Tests if a specified <code>Point2D</code> is inside the boundary of the <code>Shape</code>.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/awt/Shape.html#contains(java.awt.geom.Point2D)">contains</A></CODE> in interface <CODE><A HREF="../../../java/awt/Shape.html">Shape</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>p</CODE> - the specified <code>Point2D</code><DT><B>Returns:</B><DD><code>true</code> if the <code>Point2D</code> is inside the <code>Shape</code> object's boundary; <code>false</code> otherwise.</DL></DD></DL><HR><A NAME="intersects(java.awt.geom.Rectangle2D)"><!-- --></A><H3>intersects</H3><PRE>public boolean <B>intersects</B>(<A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> r)</PRE><DL><DD>Tests if the interior of the<code>Shape</code> intersects the interior of a specified <code>Rectangle2D</code>.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/awt/Shape.html#intersects(java.awt.geom.Rectangle2D)">intersects</A></CODE> in interface <CODE><A HREF="../../../java/awt/Shape.html">Shape</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - the specified <code>Rectangle2D</code><DT><B>Returns:</B><DD><code>true</code> if the <code>Shape</code> and the specified <code>Rectangle2D</code> intersect each other; <code>false</code> otherwise.</DL></DD></DL><HR><A NAME="contains(java.awt.geom.Rectangle2D)"><!-- --></A><H3>contains</H3><PRE>public boolean <B>contains</B>(<A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> r)</PRE><DL><DD>Tests if the interior of the <code>Shape</code> entirely contains the specified <code>Rectangle2D</code>.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/awt/Shape.html#contains(java.awt.geom.Rectangle2D)">contains</A></CODE> in interface <CODE><A HREF="../../../java/awt/Shape.html">Shape</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - the specified <code>Rectangle2D</code><DT><B>Returns:</B><DD><code>true</code> if the <code>Shape</code> entirely contains the specified <code>Rectangle2D</code>; <code>false</code> otherwise.</DL></DD></DL><HR><A NAME="getBounds()"><!-- --></A><H3>getBounds</H3><PRE>public <A HREF="../../../java/awt/Rectangle.html">Rectangle</A> <B>getBounds</B>()</PRE><DL><DD>Returns the bounding box of the <code>Shape</code>.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/awt/Shape.html#getBounds()">getBounds</A></CODE> in interface <CODE><A HREF="../../../java/awt/Shape.html">Shape</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a <A HREF="../../../java/awt/Rectangle.html"><CODE>Rectangle</CODE></A> object that bounds the <code>Shape</code>.</DL></DD></DL><HR><A NAME="getPathIterator(java.awt.geom.AffineTransform, double)"><!-- --></A><H3>getPathIterator</H3><PRE>public <A HREF="../../../java/awt/geom/PathIterator.html">PathIterator</A> <B>getPathIterator</B>(<A HREF="../../../java/awt/geom/AffineTransform.html">AffineTransform</A> at, double flatness)</PRE><DL><DD>Returns an iterator object that iterates along the <code>Shape</code> object's boundary and provides access to a flattened view of the outline of the <code>Shape</code> object's geometry. <p> Only SEG_MOVETO, SEG_LINETO, and SEG_CLOSE point types will be returned by the iterator. <p> The amount of subdivision of the curved segments is controlled by the <code>flatness</code> parameter, which specifies the maximum distance that any point on the unflattened transformed curve can deviate from the returned flattened path segments. An optional <A HREF="../../../java/awt/geom/AffineTransform.html"><CODE>AffineTransform</CODE></A> can be specified so that the coordinates returned in the iteration are transformed accordingly.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/awt/Shape.html#getPathIterator(java.awt.geom.AffineTransform, double)">getPathIterator</A></CODE> in interface <CODE><A HREF="../../../java/awt/Shape.html">Shape</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>at</CODE> - an optional <code>AffineTransform</code> to be applied to the coordinates as they are returned in the iteration, or <code>null</code> if untransformed coordinates are desired.<DD><CODE>flatness</CODE> - the maximum distance that the line segments used to approximate the curved segments are allowed to deviate from any point on the original curve<DT><B>Returns:</B><DD>a <code>PathIterator</code> object that provides access to the <code>Shape</code> object's flattened geometry.</DL></DD></DL><HR><A NAME="clone()"><!-- --></A><H3>clone</H3><PRE>public <A HREF="../../../java/lang/Object.html">Object</A> <B>clone</B>()</PRE><DL><DD>Creates a new object of the same class and with the same contents as this object.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/lang/Object.html#clone()">clone</A></CODE> in class <CODE><A HREF="../../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a clone of this instance.<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/OutOfMemoryError.html">OutOfMemoryError</A></CODE> - if there is not enough memory.<DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><A HREF="../../../java/lang/Cloneable.html"><CODE>Cloneable</CODE></A></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/RectangularShape.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/geom/Rectangle2D.Float.html"><B>PREV CLASS</B></A> <A HREF="../../../java/awt/geom/RoundRectangle2D.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="RectangularShape.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 + -
显示快捷键?