edu.colorado.cs.ns2.graphics
Interface Drawable

All Known Implementing Classes:
LineDrawable, RectDrawable

public interface Drawable

Interface to Respresent Drawable Objects (Nodes and Links).

Author:
Kevin Bauer, Pushkar Sambhoos.

Method Summary
 void drawSelf(java.awt.Graphics g, boolean clear)
          Draws a shape.
 void move(int dX, int dY)
          Changes the co-dinates of the location of Node.
 boolean within(int X, int Y)
          Returns True if the point defined by the arguments (x,y) are within a shape.
 

Method Detail

within

boolean within(int X,
               int Y)
Returns True if the point defined by the arguments (x,y) are within a shape.

Parameters:
X - X-coordinate.
Y - Y-coordinate.
Returns:
True if the point defined by the arguments (x,y) are within a shape.

drawSelf

void drawSelf(java.awt.Graphics g,
              boolean clear)
Draws a shape.

Parameters:
g - Reference to the Graphics object.
clear - Set it to false to erase the Node.
See Also:
drawSelf(java.awt.Graphics, boolean)

move

void move(int dX,
          int dY)
Changes the co-dinates of the location of Node.

Parameters:
dX - - change in x co-ordinate.
dY - - change in y co-ordinate.
See Also:
move(int, int)