You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Figure.java 622B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package mvcgrafik.model;
  7. import java.awt.Point;
  8. import java.util.ArrayList;
  9. import java.util.Collections;
  10. import java.util.List;
  11. /**
  12. *
  13. * @author chris, hd
  14. */
  15. public class Figure
  16. {
  17. private ArrayList<Point> punkte;
  18. public Figure()
  19. {
  20. punkte = new ArrayList<>();
  21. }
  22. public void addPoint(Point p)
  23. {
  24. punkte.add(p);
  25. }
  26. public List<Point> getPunkte()
  27. {
  28. return Collections.unmodifiableList(punkte);
  29. }
  30. }