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 675B

12345678910111213141516171819202122232425262728293031323334353637
  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.io.Serializable;
  9. import java.util.ArrayList;
  10. import java.util.Collections;
  11. import java.util.List;
  12. /**
  13. *
  14. * @author chris, hd
  15. */
  16. public class Figure implements Serializable
  17. {
  18. private ArrayList<Point> punkte;
  19. public Figure()
  20. {
  21. punkte = new ArrayList<>();
  22. }
  23. public void addPoint(Point p)
  24. {
  25. punkte.add(p);
  26. }
  27. public List<Point> getPunkte()
  28. {
  29. return Collections.unmodifiableList(punkte);
  30. }
  31. }