DrawObject.java 478 B

1234567891011121314151617181920212223242526
  1. package model.drawObjects;
  2. import java.awt.Graphics2D;
  3. import java.awt.geom.AffineTransform;
  4. public abstract class DrawObject {
  5. protected AffineTransform transform;
  6. protected double width,height;
  7. protected int index = 0;
  8. public DrawObject() {
  9. transform = new AffineTransform();
  10. }
  11. public int getIndex(){
  12. return index;
  13. }
  14. public void setIndex(int index){
  15. this.index = index;
  16. }
  17. public abstract void draw(Graphics2D g2);
  18. public abstract void update();
  19. }