/** @(#) Drawable.java 1.0 99/07/24 Larry Rodrigues
 **/
package com.vistech.shapes;
import java.awt.*;
/** Specifies methods for drawing shapes interactively on a canvas.
  * @version 1.0  24  July 1999
  * @author Larry Rodrigues
  **/
public interface Drawable{
   public static final int NONE=0;
   public static final int BOX=1;
   public static final int ELLIPSE=2;
   public static final int LINE =3;
   public static final int ARROW= 4;
   public static final int DOUBLE_HEADED_ARROW= 5;
   public static final int CURVE = 7;
   public static final int CUBIC_CURVE = 8;
   public static final int POLYGON = 9;
   public static final int ANNOTEXT=6;

   /** Initializes the shape. The inputs specify the anchor position of the shape,
     * @param x the y coordinate of the starting position of the shape.
     * @param y the y coordinate of the starting position of the shape.
     */
   public abstract void init(int x, int y);
   /** Sets the current position.
     * @param cp the current position of shape
     */
   public abstract void setCurrentPosition(Point cp);

   /** Draws the shape interactively, which means the shape can be erased when
     * the mouse moves to next poistion.
     * @param g the graphcs context on which the shape is drawn.
     */
   public abstract void drawInteractive(Graphics2D g);

   /** Draws the shape permanently, which happens when the mouse is released.
     * @param g the graphcs context on which the shape is drawn.
     */
   public abstract void draw(Graphics2D g);

   /** Moves the shape by a specified displacement.
     * @param x the displacement.
     * @param y the displacement.
     **/
   public abstract void move(Graphics2D g, int dispX, int dispY);

   /** Erase the shape.
     * @param g the graphcs context on which the shape was drawn.
     **/
   public abstract void erase(Graphics2D g);
}
