|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | |||||||||
java.lang.Objectjava.awt.geom.Point2D
java.awt.Point
public class Point
Á¤¼ö Á¤¹Ðµµ·Î ÁöÁ¤µÇ´Â (x, y) ÁÂÇ¥ °ø°£¿¡¼ÀÇ À§Ä¡¸¦ ³ªÅ¸³»´Â Á¡ÀÔ´Ï´Ù.
| Áßø(Nested) Ŭ·¡½º °³¿ä |
|---|
| Ŭ·¡½º java.awt.geom. Point2D ·ÎºÎÅÍ »ó¼ÓµÈ Áßø(Nested) Ŭ·¡½º/ÀÎÅÍÆäÀ̽º |
|---|
Point2D.Double,
Point2D.Float |
| ÇÊµå °³¿ä | |
|---|---|
int |
x
x ÁÂÇ¥ÀÔ´Ï´Ù. |
int |
y
y ÁÂÇ¥ÀÔ´Ï´Ù. |
| »ý¼ºÀÚ °³¿ä | |
|---|---|
Point ()
ÁÂÇ¥ °ø°£ÀÇ ¿øÁ¡ (0, 0)¿¡ Á¡À» ±¸ÃàÇØ ÃʱâÈÇÕ´Ï´Ù. |
|
Point (int x,
int y)
ÁÂÇ¥ °ø°£ÀÇ ÁöÁ¤µÈ À§Ä¡ (x, y)¿¡ Á¡À» ±¸ÃàÇØ ÃʱâÈÇÕ´Ï´Ù. |
|
Point (Point p)
Á¡À» ±¸ÃàÇØ, ÁöÁ¤µÈ Point¿Í
°°Àº À§Ä¡¿¡ ÃʱâÈÇÕ´Ï´Ù. |
|
| ¸Þ¼µå °³¿ä | |
|---|---|
boolean |
equals (Object obj)
2°³ÀÇ Á¡ÀÌ µ¿ÀÏÇÑÁö ¾î¶²Áö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù. |
Point |
getLocation ()
ÀÌ Á¡ÀÇ À§Ä¡¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
double |
getX ()
Á¡ÀÇ X ÁÂÇ¥¸¦ ¹èÁ¤¹Ðµµ·Î ¸®ÅÏÇÕ´Ï´Ù. |
double |
getY ()
Á¡ÀÇ Y ÁÂÇ¥¸¦ ¹èÁ¤¹Ðµµ·Î ¸®ÅÏÇÕ´Ï´Ù. |
void |
move (int x,
int y)
ÀÌ Á¡À» (x, y) ÁÂÇ¥ Æò¸é»óÀÇ ÁöÁ¤µÈ À§Ä¡·Î À̵¿ÇÕ´Ï´Ù. |
void |
setLocation (double x,
double y)
ÀÌ Á¡ÀÇ À§°ªÀÌ ÁöÁ¤µÈ double ÁÂÇ¥·Î ¼³Á¤ÇÕ´Ï´Ù. |
void |
setLocation (int x,
int y)
ÀÌ Á¡ÀÌ ÁöÁ¤µÈ À§Ä¡·Î º¯°æÇÕ´Ï´Ù. |
void |
setLocation (Point p)
ÀÌ Á¡ÀÇ À§Ä¡¸¦, ÁöÁ¤µÈ À§Ä¡·Î ¼³Á¤ÇÕ´Ï´Ù. |
String |
toString ()
ÀÌ Á¡ ¹× (x, y) ÁÂÇ¥ °ø°£¿¡¼ÀÇ ÀÌ Á¡ÀÇ À§Ä¡¸¦ ³ªÅ¸³»´Â ij¸¯ÅÍ ¶óÀÎÀ» ¸®ÅÏÇÕ´Ï´Ù. |
void |
translate (int dx,
int dy)
(x, y)ÀÇ À§Ä¡¿¡ ÀÖ´Â ÀÌ Á¡À» x ÃàÀ¸·Î µû¶ó dx, y ÃàÀ¸·Î µû¶ó dy·Î
À̵¿ÇØ, Á¡ (x + dx, y + dy)À» ³ªÅ¸³»µµ·Ï
ÇÕ´Ï´Ù. |
| Ŭ·¡½º java.awt.geom. Point2D ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
|---|
clone,
distance,
distance,
distance,
distanceSq,
distanceSq,
distanceSq,
hashCode,
setLocation |
| Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
|---|
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
| ÇʵåÀÇ »ó¼¼ |
|---|
public int x
getLocation(),
move(int, int) public int y
getLocation(),
move(int, int) | »ý¼ºÀÚ »ó¼¼ |
|---|
public Point()
public Point(Point p)
Point¿Í
°°Àº À§Ä¡¿¡ ÃʱâÈÇÕ´Ï´Ù.
p - Á¡
public Point(int x,
int y)
x - x ÁÂÇ¥y - y ÁÂÇ¥| ¸Þ¼µåÀÇ »ó¼¼ |
|---|
public double getX()
Point2D ³»ÀÇ getX public double getY()
Point2D ³»ÀÇ getY public Point getLocation()
Component
getLocation ¸Þ¼µå¿¡ ´ëÀÀÇÕ´Ï´Ù.
Component.getLocation(),
setLocation(java.awt.Point),
setLocation(int, int) public void setLocation(Point p)
Component
setLocation ¸Þ¼µå¿¡ ´ëÀÀÇÕ´Ï´Ù.
p - ÀÌ Á¡ÀÇ »õ·Î¿î À§°ªÀÌ µÇ´Â Á¡Component.setLocation(java.awt.Point),
getLocation()
public void setLocation(int x,
int y)
ÀÌ ¸Þ¼µå´Â ¿ÏÀü¼ºÀ» À§Çؼ ÁغñµÇ¾î ÀÖ¾î¼,
Component
setLocation ¸Þ¼µå¿¡ ´ëÀÀÇÕ´Ï´Ù. ÀÌ ¸Þ¼µåÀÇ µ¿ÀÛÀº move(int, int)¿Í
°°½À´Ï´Ù.
x - »õ·Î¿î À§Ä¡ÀÇ x ÁÂÇ¥y - »õ·Î¿î À§Ä¡ÀÇ y ÁÂÇ¥Component.setLocation(int, int),
getLocation(),
move(int, int)
public void setLocation(double x,
double y)
Integer.MIN_VALUE º¸´Ù ÀÛÀº ÀÓÀÇÀÇ ¼ö´Â MIN_VALUE¿¡ ¸®¼Â µÇ¾îInteger.MAX_VALUE º¸´Ù Å« °ªÀº MAX_VALUE¿¡ ¸®¼Â µË´Ï´Ù.
Point2D ³»ÀÇ setLocation x - »õ·Î¿î À§Ä¡ÀÇ x ÁÂÇ¥y - »õ·Î¿î À§Ä¡ÀÇ y ÁÂÇ¥getLocation()
public void move(int x,
int y)
setLocation(int, int)¿Í
°°½À´Ï´Ù.
x - »õ·Î¿î À§Ä¡ÀÇ x ÁÂÇ¥y - »õ·Î¿î À§Ä¡ÀÇ y ÁÂÇ¥Component.setLocation(int, int)
public void translate(int dx,
int dy)
dx, y ÃàÀ¸·Î µû¶ó dy·Î
À̵¿ÇØ, Á¡ (x + dx, y + dy)À» ³ªÅ¸³»µµ·Ï
ÇÕ´Ï´Ù.
dx - x ÃàÀ¸·Î µû¶ó ÀÌ Á¡ÀÌ À̵¿µÇ´Â °Å¸®dy - y ÃàÀ¸·Î µû¶ó ÀÌ Á¡ÀÌ À̵¿µÇ´Â °Å¸®public boolean equals(Object obj)
Point2D
2°³ÀÇ ÀνºÅϽº´Â x ¹× y ¸â¹ö Çʵå (ÁÂÇ¥ °ø°£¿¡¼ ±×·¯ÇÑ À§Ä¡¸¦ ³ªÅ¸³½´Ù)ÀÇ °ªÀÌ °°Àº °æ¿ì¿¡ µ¿ÀÏÇØÁý´Ï´Ù.
Point2D ³»ÀÇ equals obj - ÀÌ Point2D ¶ó°í ºñ±³µÇ´Â °´Ã¼
Point2D
ÀνºÅϽºÀ̸ç, °°Àº °ªÀ» °¡Áö´Â °æ¿ì´Â true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â falseObject.hashCode(),
Hashtable public String toString()
null·Î´Â µÇÁö ¾Ê½À´Ï´Ù.
Object ³»ÀÇ toString
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | |||||||||
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.