point2d.html
来自「API資料大全」· HTML 代码 · 共 584 行 · 第 1/2 页
HTML
584 行
<A NAME="Point2D()"><!-- --></A><H3>Point2D</H3><PRE>protected <B>Point2D</B>()</PRE><DL><DD>This is an abstract class that cannot be instantiated directly. Type-specific implementation subclasses are available for instantiation and provide a number of formats for storing the information necessary to satisfy the various accessor methods below.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/geom/Point2D.Float.html"><CODE>Point2D.Float</CODE></A>, <A HREF="../../../java/awt/geom/Point2D.Double.html"><CODE>Point2D.Double</CODE></A>, <A HREF="../../../java/awt/Point.html"><CODE>Point</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="getX()"><!-- --></A><H3>getX</H3><PRE>public abstract double <B>getX</B>()</PRE><DL><DD>Returns the X coordinate of this <code>Point2D</code> in <code>double</code> precision.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the X coordinate of this <code>Point2D</code>.<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="getY()"><!-- --></A><H3>getY</H3><PRE>public abstract double <B>getY</B>()</PRE><DL><DD>Returns the Y coordinate of this <code>Point2D</code> in <code>double</code> precision.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the Y coordinate of this <code>Point2D</code>.<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="setLocation(double, double)"><!-- --></A><H3>setLocation</H3><PRE>public abstract void <B>setLocation</B>(double x, double y)</PRE><DL><DD>Sets the location of this <code>Point2D</code> to the specified <code>float</code> coordinates.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>x, y</CODE> - the coordinates of this <code>Point2D</code><DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="setLocation(java.awt.geom.Point2D)"><!-- --></A><H3>setLocation</H3><PRE>public void <B>setLocation</B>(<A HREF="../../../java/awt/geom/Point2D.html">Point2D</A> p)</PRE><DL><DD>Sets the location of this <code>Point2D</code> to the same coordinates as the specified <code>Point2D</code> object.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>p</CODE> - the specified <code>Point2D</code> the which to set this <code>Point2D</code><DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="distanceSq(double, double, double, double)"><!-- --></A><H3>distanceSq</H3><PRE>public static double <B>distanceSq</B>(double X1, double Y1, double X2, double Y2)</PRE><DL><DD>Returns the square of the distance between two points.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>X1, Y1</CODE> - the coordinates of the first point<DD><CODE>X2, Y2</CODE> - the coordinates of the second point<DT><B>Returns:</B><DD>the square of the distance between the two sets of specified coordinates.</DL></DD></DL><HR><A NAME="distance(double, double, double, double)"><!-- --></A><H3>distance</H3><PRE>public static double <B>distance</B>(double X1, double Y1, double X2, double Y2)</PRE><DL><DD>Returns the distance between two points.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>X1, Y1</CODE> - the coordinates of the first point<DD><CODE>X2, Y2</CODE> - the coordinates of the second point<DT><B>Returns:</B><DD>the distance between the two sets of specified coordinates.</DL></DD></DL><HR><A NAME="distanceSq(double, double)"><!-- --></A><H3>distanceSq</H3><PRE>public double <B>distanceSq</B>(double PX, double PY)</PRE><DL><DD>Returns the square of the distance from this <code>Point2D</code> to a specified point.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>PX, PY</CODE> - the coordinates of the other point<DT><B>Returns:</B><DD>the square of the distance between this <code>Point2D</code> and the specified point.</DL></DD></DL><HR><A NAME="distanceSq(java.awt.geom.Point2D)"><!-- --></A><H3>distanceSq</H3><PRE>public double <B>distanceSq</B>(<A HREF="../../../java/awt/geom/Point2D.html">Point2D</A> pt)</PRE><DL><DD>Returns the square of the distance from this <code>Point2D</code> to a specified <code>Point2D</code>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>pt</CODE> - the specified <code>Point2D</code><DT><B>Returns:</B><DD>the square of the distance between this <code>Point2D</code> to a specified <code>Point2D</code>.</DL></DD></DL><HR><A NAME="distance(double, double)"><!-- --></A><H3>distance</H3><PRE>public double <B>distance</B>(double PX, double PY)</PRE><DL><DD>Returns the distance from this <code>Point2D</code> to a specified point.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>PX, PY</CODE> - the coordinates of the specified <code>Point2D</code><DT><B>Returns:</B><DD>the distance between this <code>Point2D</code> and a specified point.</DL></DD></DL><HR><A NAME="distance(java.awt.geom.Point2D)"><!-- --></A><H3>distance</H3><PRE>public double <B>distance</B>(<A HREF="../../../java/awt/geom/Point2D.html">Point2D</A> pt)</PRE><DL><DD>Returns the distance from this <code>Point2D</code> to a specified <code>Point2D</code>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>pt</CODE> - the specified <code>Point2D</code><DT><B>Returns:</B><DD>the distance between this <code>Point2D</code> and the specified <code>Point2D</code>.</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><HR><A NAME="hashCode()"><!-- --></A><H3>hashCode</H3><PRE>public int <B>hashCode</B>()</PRE><DL><DD>Returns the hashcode for this <code>Point2D</code>.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/lang/Object.html#hashCode()">hashCode</A></CODE> in class <CODE><A HREF="../../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a hash code for this <code>Point2D</code>.</DL></DD></DL><HR><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(<A HREF="../../../java/lang/Object.html">Object</A> obj)</PRE><DL><DD>Determines whether or not two points are equal. Two instances of <code>Point2D</code> are equal if the values of their <code>x</code> and <code>y</code> member fields, representing their position in the coordinate space, are the same.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/lang/Object.html#equals(java.lang.Object)">equals</A></CODE> in class <CODE><A HREF="../../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - an object to be compared with this <code>Point2D</code><DT><B>Returns:</B><DD><code>true</code> if the object to be compared is an instance of <code>Point2D</code> and has the same values; <code>false</code> otherwise.<DT><B>Since: </B><DD>1.2</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/Point2D.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/Line2D.Float.html"><B>PREV CLASS</B></A> <A HREF="../../../java/awt/geom/Point2D.Double.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="Point2D.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#inner_class_summary">INNER</A> | 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 + -
显示快捷键?