rectangle.html

来自「API資料大全」· HTML 代码 · 共 1,466 行 · 第 1/5 页

HTML
1,466
字号
         int&nbsp;Y,         int&nbsp;W,         int&nbsp;H)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks whether this <code>Rectangle</code> entirely contains  the <code>Rectangle</code> at the specified location (<i>X</i>,&nbsp;<i>Y</i>) with the specified dimensions (<i>W</i>,&nbsp;<i>H</i>).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Rectangle.html#contains(java.awt.Point)">contains</A></B>(<A HREF="../../java/awt/Point.html">Point</A>&nbsp;p)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks whether or not this <code>Rectangle</code> contains the  specified <code>Point</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Rectangle.html#contains(java.awt.Rectangle)">contains</A></B>(<A HREF="../../java/awt/Rectangle.html">Rectangle</A>&nbsp;r)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks whether or not this <code>Rectangle</code> entirely contains  the specified <code>Rectangle</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/awt/geom/Rectangle2D.html">Rectangle2D</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Rectangle.html#createIntersection(java.awt.geom.Rectangle2D)">createIntersection</A></B>(<A HREF="../../java/awt/geom/Rectangle2D.html">Rectangle2D</A>&nbsp;r)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a new <A HREF="../../java/awt/geom/Rectangle2D.html"><CODE>Rectangle2D</CODE></A> object representing the intersection of this <code>Rectangle</code> with the  specified <code>Rectangle2D</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/awt/geom/Rectangle2D.html">Rectangle2D</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Rectangle.html#createUnion(java.awt.geom.Rectangle2D)">createUnion</A></B>(<A HREF="../../java/awt/geom/Rectangle2D.html">Rectangle2D</A>&nbsp;r)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a new <code>Rectangle2D</code> object representing the union of this <code>Rectangle</code> with the specified  <code>Rectangle2D</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Rectangle.html#equals(java.lang.Object)">equals</A></B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;obj)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks whether two rectangles are equal.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/awt/Rectangle.html">Rectangle</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Rectangle.html#getBounds()">getBounds</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the bounding <code>Rectangle</code> of this <code>Rectangle</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/awt/geom/Rectangle2D.html">Rectangle2D</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Rectangle.html#getBounds2D()">getBounds2D</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the high precision bounding box of this rectangle.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Rectangle.html#getHeight()">getHeight</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the height of the bounding <code>Rectangle</code> in  <code>double</code> precision.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/awt/Point.html">Point</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Rectangle.html#getLocation()">getLocation</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the location of this <code>Rectangle</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/awt/Dimension.html">Dimension</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Rectangle.html#getSize()">getSize</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the size of this <code>Rectangle</code>, represented by  the returned <code>Dimension</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Rectangle.html#getWidth()">getWidth</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the width of the bounding <code>Rectangle</code> in  <code>double</code> precision.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Rectangle.html#getX()">getX</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the X coordinate of the bounding <code>Rectangle</code> in  <code>double</code> precision.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Rectangle.html#getY()">getY</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Y coordinate of the bounding <code>Rectangle</code> in  <code>double</code> precision.</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="../../java/awt/Rectangle.html#grow(int, int)">grow</A></B>(int&nbsp;h,     int&nbsp;v)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resizes the <code>Rectangle</code> both horizontally and vertically.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Rectangle.html#inside(int, int)">inside</A></B>(int&nbsp;x,       int&nbsp;y)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>contains(int, int)</code>.</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/awt/Rectangle.html">Rectangle</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Rectangle.html#intersection(java.awt.Rectangle)">intersection</A></B>(<A HREF="../../java/awt/Rectangle.html">Rectangle</A>&nbsp;r)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Computes the intersection of this <code>Rectangle</code> with the  specified <code>Rectangle</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Rectangle.html#intersects(java.awt.Rectangle)">intersects</A></B>(<A HREF="../../java/awt/Rectangle.html">Rectangle</A>&nbsp;r)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines whether or not this <code>Rectangle</code> and the specified  <code>Rectangle</code> intersect.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Rectangle.html#isEmpty()">isEmpty</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines whether or not this <code>Rectangle</code> is empty.</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="../../java/awt/Rectangle.html#move(int, int)">move</A></B>(int&nbsp;x,     int&nbsp;y)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>setLocation(int, int)</code>.</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Rectangle.html#outcode(double, double)">outcode</A></B>(double&nbsp;x,        double&nbsp;y)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines where the specified coordinates lie with respect to this <code>Rectangle</code>.</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="../../java/awt/Rectangle.html#reshape(int, int, int, int)">reshape</A></B>(int&nbsp;x,        int&nbsp;y,        int&nbsp;width,        int&nbsp;height)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>setBounds(int, int, int, int)</code>.</I></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="../../java/awt/Rectangle.html#resize(int, int)">resize</A></B>(int&nbsp;width,       int&nbsp;height)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>setSize(int, int)</code>.</I></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="../../java/awt/Rectangle.html#setBounds(int, int, int, int)">setBounds</A></B>(int&nbsp;x,          int&nbsp;y,          int&nbsp;width,          int&nbsp;height)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the bounding <code>Rectangle</code> of this  <code>Rectangle</code> to the specified  <code>x</code>, <code>y</code>, <code>width</code>,  and <code>height</code>.</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="../../java/awt/Rectangle.html#setBounds(java.awt.Rectangle)">setBounds</A></B>(<A HREF="../../java/awt/Rectangle.html">Rectangle</A>&nbsp;r)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the bounding <code>Rectangle</code> of this <code>Rectangle</code>  to match the specified <code>Rectangle</code>.</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="../../java/awt/Rectangle.html#setLocation(int, int)">setLocation</A></B>(int&nbsp;x,            int&nbsp;y)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves this <code>Rectangle</code> to the specified location.</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="../../java/awt/Rectangle.html#setLocation(java.awt.Point)">setLocation</A></B>(<A HREF="../../java/awt/Point.html">Point</A>&nbsp;p)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves this <code>Rectangle</code> to the specified location.</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="../../java/awt/Rectangle.html#setRect(double, double, double, double)">setRect</A></B>(double&nbsp;x,        double&nbsp;y,        double&nbsp;width,        double&nbsp;height)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the bounds of this <code>Rectangle</code> to the specified  <code>x</code>, <code>y</code>, <code>width</code>,  and <code>height</code>.</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="../../java/awt/Rectangle.html#setSize(java.awt.Dimension)">setSize</A></B>(<A HREF="../../java/awt/Dimension.html">Dimension</A>&nbsp;d)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the size of this <code>Rectangle</code> to match the  specified <code>Dimension</code>.</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="../../java/awt/Rectangle.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;Sets the size of this <code>Rectangle</code> to the specified  width and height.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Rectangle.html#toString()">toString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>String</code> representing this  <code>Rectangle</code> and its values.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor">

⌨️ 快捷键说明

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