java.lang.Objectcomputational.geometry.meshgeneration.MyPoint
public class MyPoint
| Constructor Summary | |
|---|---|
MyPoint()
|
|
MyPoint(int x,
int y)
|
|
MyPoint(MyPoint P)
|
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object a)
|
boolean |
contains(Point p)
Tells whether the shape encloses a given point. |
void |
draw(java.awt.Graphics gfx)
Draws the shape, using the current graphics context's color. |
void |
drawLabels(java.awt.Graphics gfx)
Draws the shape's associated labels, using the graphics context's color. |
void |
drawPoints(java.awt.Graphics gfx)
Draws the shape's defining points, using the graphics context's color. |
java.lang.String |
getLabel()
Returns the text label associated to this shape. |
java.util.List |
getPoints()
Returns a list containing copies of the shape's defining points. |
int |
getx()
|
int |
gety()
|
void |
setLabel(java.lang.String label)
Associates this shape with a given text label. |
void |
setx(int x)
|
void |
sety(int y)
|
void |
translate(int dx,
int dy)
Translates the shape by the given amount. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MyPoint()
public MyPoint(int x,
int y)
public MyPoint(MyPoint P)
| Method Detail |
|---|
public int compareTo(java.lang.Object a)
public boolean contains(Point p)
Shape
contains in interface Shapep - the point we test for encloseness.
public void draw(java.awt.Graphics gfx)
Shape
draw in interface Shapegfx - the graphics context where this shape has to be drawn.public void drawLabels(java.awt.Graphics gfx)
Shape
drawLabels in interface Shapegfx - the graphics context where this shape's labels have
to be drawn.public void drawPoints(java.awt.Graphics gfx)
Shape
drawPoints in interface Shapegfx - the graphics context where this shape's points have
to be drawn.public java.lang.String getLabel()
Shape
getLabel in interface Shapepublic java.util.List getPoints()
Shape
getPoints in interface Shapepublic int getx()
public int gety()
public void setLabel(java.lang.String label)
Shape
setLabel in interface Shapelabel - the shape's new label.public void setx(int x)
public void sety(int y)
public void translate(int dx,
int dy)
Shape
translate in interface Shapedx - the amount to translate along the X-axis