jdraw.graphicobjects
Class Point

java.lang.Object
  |
  +--jdraw.graphicobjects.GraphicObject
        |
        +--jdraw.graphicobjects.Point

public class Point
extends GraphicObject

A point.


Field Summary
private static int CROSS_RADIUS
          The radius, in pixels, of the cross representing this point.
private static Cursor CURSOR
          The mouse cursor for this object.
static String FRIENDLY_NAME
          The friendly name of objects of this class.
 
Fields inherited from class jdraw.graphicobjects.GraphicObject
 
Constructor Summary
Point(int x, int y, Color color)
          Creates a new Point with specified position and color.
 
Method Summary
 Rectangle getBoundingBox()
          Returns the bounding box of this point.
 Cursor getCursor()
          Returns the mouse cursor for this object.
 int getDistanceSq(Point point)
          Returns the square of the minimal distance between this point and the specified point.
 String getFriendlyName()
          Returns the friendly name of this point.
 void paint(Graphics g)
          Paints this point.
 
Methods inherited from class jdraw.graphicobjects.GraphicObject
getColor, getDistance, getDistanceSq, getDistanceSq, getX, getY, updateCachedData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FRIENDLY_NAME

public static final String FRIENDLY_NAME
The friendly name of objects of this class.

See Also:
Constant Field Values

CURSOR

private static final Cursor CURSOR
The mouse cursor for this object.


CROSS_RADIUS

private static int CROSS_RADIUS
The radius, in pixels, of the cross representing this point.

Constructor Detail

Point

public Point(int x,
             int y,
             Color color)
Creates a new Point with specified position and color.

Method Detail

getBoundingBox

public Rectangle getBoundingBox()
Returns the bounding box of this point.

Specified by:
getBoundingBox in class GraphicObject

getCursor

public Cursor getCursor()
Returns the mouse cursor for this object.

Specified by:
getCursor in class GraphicObject

getFriendlyName

public String getFriendlyName()
Returns the friendly name of this point.

Specified by:
getFriendlyName in class GraphicObject

paint

public void paint(Graphics g)
Paints this point.

Specified by:
paint in class GraphicObject

getDistanceSq

public int getDistanceSq(Point point)
Returns the square of the minimal distance between this point and the specified point.

Specified by:
getDistanceSq in class GraphicObject