rectangle.html

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

HTML
1,466
字号
<A NAME="getBounds()"><!-- --></A><H3>getBounds</H3><PRE>public <A HREF="../../java/awt/Rectangle.html">Rectangle</A> <B>getBounds</B>()</PRE><DL><DD>Gets the bounding <code>Rectangle</code> of this <code>Rectangle</code>. <p> This method is included for completeness, to parallel the <code>getBounds</code> method of  <A HREF="../../java/awt/Component.html"><CODE>Component</CODE></A>.<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><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/awt/geom/RectangularShape.html#getBounds()">getBounds</A></CODE> in class <CODE><A HREF="../../java/awt/geom/RectangularShape.html">RectangularShape</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a new <code>Rectangle</code>, equal to the  bounding <code>Rectangle</code> for this <code>Rectangle</code>.<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/Component.html#getBounds()"><CODE>Component.getBounds()</CODE></A></DL></DD></DL><HR><A NAME="getBounds2D()"><!-- --></A><H3>getBounds2D</H3><PRE>public <A HREF="../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> <B>getBounds2D</B>()</PRE><DL><DD>Return the high precision bounding box of this rectangle.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/awt/Shape.html#getBounds2D()">getBounds2D</A></CODE> in interface <CODE><A HREF="../../java/awt/Shape.html">Shape</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/awt/geom/Rectangle2D.html#getBounds2D()">getBounds2D</A></CODE> in class <CODE><A HREF="../../java/awt/geom/Rectangle2D.html">Rectangle2D</A></CODE></DL></DD><DD><DL><DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="setBounds(java.awt.Rectangle)"><!-- --></A><H3>setBounds</H3><PRE>public void <B>setBounds</B>(<A HREF="../../java/awt/Rectangle.html">Rectangle</A>&nbsp;r)</PRE><DL><DD>Sets the bounding <code>Rectangle</code> of this <code>Rectangle</code>  to match the specified <code>Rectangle</code>. <p> This method is included for completeness, to parallel the <code>setBounds</code> method of <code>Component</code>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - the specified <code>Rectangle</code><DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/Component.html#setBounds(java.awt.Rectangle)"><CODE>Component.setBounds(java.awt.Rectangle)</CODE></A></DL></DD></DL><HR><A NAME="setBounds(int, int, int, int)"><!-- --></A><H3>setBounds</H3><PRE>public void <B>setBounds</B>(int&nbsp;x,                      int&nbsp;y,                      int&nbsp;width,                      int&nbsp;height)</PRE><DL><DD>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>. <p> This method is included for completeness, to parallel the <code>setBounds</code> method of <code>Component</code>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>x,&nbsp;y</CODE> - the new coordinates for the top-left                    corner of this <code>Rectangle</code><DD><CODE>width</CODE> - the new width for this <code>Rectangle</code><DD><CODE>height</CODE> - the new height for this <code>Rectangle</code><DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/Component.html#setBounds(int, int, int, int)"><CODE>Component.setBounds(int, int, int, int)</CODE></A></DL></DD></DL><HR><A NAME="setRect(double, double, double, double)"><!-- --></A><H3>setRect</H3><PRE>public void <B>setRect</B>(double&nbsp;x,                    double&nbsp;y,                    double&nbsp;width,                    double&nbsp;height)</PRE><DL><DD>Sets the bounds of this <code>Rectangle</code> to the specified  <code>x</code>, <code>y</code>, <code>width</code>,  and <code>height</code>. This method is included for completeness, to parallel the <code>setBounds</code> method of <code>Component</code>.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/awt/geom/Rectangle2D.html#setRect(double, double, double, double)">setRect</A></CODE> in class <CODE><A HREF="../../java/awt/geom/Rectangle2D.html">Rectangle2D</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>width</CODE> - the new width for the <code>Dimension</code> object<DD><CODE>height</CODE> - the new height for the <code>Dimension</code> object</DL></DD></DL><HR><A NAME="reshape(int, int, int, int)"><!-- --></A><H3>reshape</H3><PRE>public void <B>reshape</B>(int&nbsp;x,                    int&nbsp;y,                    int&nbsp;width,                    int&nbsp;height)</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>setBounds(int, int, int, int)</code>.</I><P><DD><DL></DL></DD></DL><HR><A NAME="getLocation()"><!-- --></A><H3>getLocation</H3><PRE>public <A HREF="../../java/awt/Point.html">Point</A> <B>getLocation</B>()</PRE><DL><DD>Returns the location of this <code>Rectangle</code>. <p> This method is included for completeness, to parallel the <code>getLocation</code> method of <code>Component</code>.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the <code>Point</code> that is the top-left corner of			this <code>Rectangle</code>.<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/Component.html#getLocation()"><CODE>Component.getLocation()</CODE></A></DL></DD></DL><HR><A NAME="setLocation(java.awt.Point)"><!-- --></A><H3>setLocation</H3><PRE>public void <B>setLocation</B>(<A HREF="../../java/awt/Point.html">Point</A>&nbsp;p)</PRE><DL><DD>Moves this <code>Rectangle</code> to the specified location. <p> This method is included for completeness, to parallel the <code>setLocation</code> method of <code>Component</code>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>p</CODE> - the <code>Point</code> specifying the new location                for this <code>Rectangle</code><DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/Component.html#setLocation(java.awt.Point)"><CODE>Component.setLocation(java.awt.Point)</CODE></A></DL></DD></DL><HR><A NAME="setLocation(int, int)"><!-- --></A><H3>setLocation</H3><PRE>public void <B>setLocation</B>(int&nbsp;x,                        int&nbsp;y)</PRE><DL><DD>Moves this <code>Rectangle</code> to the specified location. <p> This method is included for completeness, to parallel the <code>setLocation</code> method of <code>Component</code>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>x,&nbsp;y</CODE> - the coordinates of the new location<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/Component.html#setLocation(int, int)"><CODE>Component.setLocation(int, int)</CODE></A></DL></DD></DL><HR><A NAME="move(int, int)"><!-- --></A><H3>move</H3><PRE>public void <B>move</B>(int&nbsp;x,                 int&nbsp;y)</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>setLocation(int, int)</code>.</I><P><DD><DL></DL></DD></DL><HR><A NAME="translate(int, int)"><!-- --></A><H3>translate</H3><PRE>public void <B>translate</B>(int&nbsp;x,                      int&nbsp;y)</PRE><DL><DD>Translates this <code>Rectangle</code> the indicated distance, to the right along the x coordinate axis, and  downward along the y coordinate axis.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>dx</CODE> - the distance to move this <code>Rectangle</code>                  along the x axis<DD><CODE>dy</CODE> - the distance to move this <code>Rectangle</code>                  along the y axis<DT><B>See Also: </B><DD><A HREF="../../java/awt/Rectangle.html#setLocation(int, int)"><CODE>setLocation(int, int)</CODE></A>, <A HREF="../../java/awt/Rectangle.html#setLocation(java.awt.Point)"><CODE>setLocation(java.awt.Point)</CODE></A></DL></DD></DL><HR><A NAME="getSize()"><!-- --></A><H3>getSize</H3><PRE>public <A HREF="../../java/awt/Dimension.html">Dimension</A> <B>getSize</B>()</PRE><DL><DD>Gets the size of this <code>Rectangle</code>, represented by  the returned <code>Dimension</code>. <p> This method is included for completeness, to parallel the <code>getSize</code> method of <code>Component</code>.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a <code>Dimension</code>, representing the size of            this <code>Rectangle</code>.<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/Component.html#getSize()"><CODE>Component.getSize()</CODE></A></DL></DD></DL><HR><A NAME="setSize(java.awt.Dimension)"><!-- --></A><H3>setSize</H3><PRE>public void <B>setSize</B>(<A HREF="../../java/awt/Dimension.html">Dimension</A>&nbsp;d)</PRE><DL><DD>Sets the size of this <code>Rectangle</code> to match the  specified <code>Dimension</code>. <p> This method is included for completeness, to parallel the <code>setSize</code> method of <code>Component</code>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>d</CODE> - the new size for the <code>Dimension</code> object<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/Component.html#setSize(java.awt.Dimension)"><CODE>Component.setSize(java.awt.Dimension)</CODE></A></DL></DD></DL><HR><A NAME="setSize(int, int)"><!-- --></A><H3>setSize</H3><PRE>public void <B>setSize</B>(int&nbsp;width,                    int&nbsp;height)</PRE><DL><DD>Sets the size of this <code>Rectangle</code> to the specified  width and height. <p> This method is included for completeness, to parallel the <code>setSize</code> method of <code>Component</code>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>width</CODE> - the new width for this <code>Rectangle</code><DD><CODE>height</CODE> - the new height for this <code>Rectangle</code><DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/Component.html#setSize(int, int)"><CODE>Component.setSize(int, int)</CODE></A></DL></DD></DL><HR><A NAME="resize(int, int)"><!-- --></A><H3>resize</H3><PRE>public void <B>resize</B>(int&nbsp;width,                   int&nbsp;height)</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>setSize(int, int)</code>.</I><P><DD><DL></DL></DD></DL><HR><A NAME="contains(java.awt.Point)"><!-- --></A><H3>contains</H3><PRE>public boolean <B>contains</B>(<A HREF="../../java/awt/Point.html">Point</A>&nbsp;p)</PRE><DL><DD>Checks whether or not this <code>Rectangle</code> contains the  specified <code>Point</code>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>p</CODE> - the <code>Point</code> to test<DT><B>Returns:</B><DD><code>true</code> if the <code>Point</code> 

⌨️ 快捷键说明

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