import java.awt.Color; import java.awt.Shape; import java.awt.geom.Rectangle2D; public class PostIt { private Rectangle2D postItShape; private boolean outlineOnly = true; private Color postItColor = Color.BLACK; public PostIt(double x, double y, double width, double height) { postItShape = new Rectangle2D.Double(x,y,width,height); } public void moveTo(double x, double y) { postItShape.setFrame(x,y,postItShape.getWidth(), postItShape.getHeight()); } public void move(double dx, double dy) { this.moveTo(postItShape.getX() + dx, postItShape.getY() + dy); } public void setColor(Color newColor) { postItColor = newColor; } public void moving() { outlineOnly = true; } public void stopped() { outlineOnly = false; } public void setSize(double width, double height) { postItShape.setFrame(postItShape.getX(),postItShape.getY(), width,height); } public boolean contains(double x, double y) { return postItShape.contains(x,y); } public double getX() { return postItShape.getX(); } public double getY() { return postItShape.getY(); } public Color getColor() { return postItColor; } public boolean isChanging() { return outlineOnly; } public Shape getShape() { return postItShape; } }