01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
package horstmann.ch04_animation;
import java.awt.Graphics2D;

/**
   A shape that can be moved around.
 */
public interface MoveableShape
{
  /**
      Draws the shape.
      @param g2 the graphics context
   */
  void draw(Graphics2D g2);
  /**
      Moves the shape by a given amount.
      @param dx the amount to translate in x-direction
      @param dy the amount to translate in y-direction
   */
  void translate(int dx, int dy);
}