computational.geometry.meshgeneration
Class MyPoint

java.lang.Object
  extended by computational.geometry.meshgeneration.MyPoint
All Implemented Interfaces:
Shape, java.lang.Cloneable
Direct Known Subclasses:
Vertex

public class MyPoint
extends java.lang.Object
implements Shape, java.lang.Cloneable


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

MyPoint

public MyPoint()

MyPoint

public MyPoint(int x,
               int y)

MyPoint

public MyPoint(MyPoint P)
Method Detail

compareTo

public int compareTo(java.lang.Object a)

contains

public boolean contains(Point p)
Description copied from interface: Shape
Tells whether the shape encloses a given point. To the aims of this test, we consider the shape to be closed, so that a point lying on the shape's boundaries results as enclosed in the shape.

Specified by:
contains in interface Shape
Parameters:
p - the point we test for encloseness.
Returns:
true iff the point is enclosed in the shape.

draw

public void draw(java.awt.Graphics gfx)
Description copied from interface: Shape
Draws the shape, using the current graphics context's color.

Specified by:
draw in interface Shape
Parameters:
gfx - the graphics context where this shape has to be drawn.

drawLabels

public void drawLabels(java.awt.Graphics gfx)
Description copied from interface: Shape
Draws the shape's associated labels, using the graphics context's color.

Specified by:
drawLabels in interface Shape
Parameters:
gfx - the graphics context where this shape's labels have to be drawn.

drawPoints

public void drawPoints(java.awt.Graphics gfx)
Description copied from interface: Shape
Draws the shape's defining points, using the graphics context's color.

Specified by:
drawPoints in interface Shape
Parameters:
gfx - the graphics context where this shape's points have to be drawn.

getLabel

public java.lang.String getLabel()
Description copied from interface: Shape
Returns the text label associated to this shape.

Specified by:
getLabel in interface Shape
Returns:
the shape's label.

getPoints

public java.util.List getPoints()
Description copied from interface: Shape
Returns a list containing copies of the shape's defining points.

Specified by:
getPoints in interface Shape
Returns:
the shape's cloned defining points.

getx

public int getx()

gety

public int gety()

setLabel

public void setLabel(java.lang.String label)
Description copied from interface: Shape
Associates this shape with a given text label.

Specified by:
setLabel in interface Shape
Parameters:
label - the shape's new label.

setx

public void setx(int x)

sety

public void sety(int y)

translate

public void translate(int dx,
                      int dy)
Description copied from interface: Shape
Translates the shape by the given amount.

Specified by:
translate in interface Shape
Parameters:
dx - the amount to translate along the X-axis