001package horstmann.ch04_animation;
002import java.awt.Graphics2D;
003
004/**
005   A shape that can be moved around.
006 */
007public interface MoveableShape
008{
009        /**
010      Draws the shape.
011      @param g2 the graphics context
012         */
013        void draw(Graphics2D g2);
014        /**
015      Moves the shape by a given amount.
016      @param dx the amount to translate in x-direction
017      @param dy the amount to translate in y-direction
018         */
019        void translate(int dx, int dy);
020}