12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- package grafikchat.model;
-
- import java.awt.Point;
- import java.io.Serializable;
- import java.util.ArrayList;
- import java.util.List;
-
- /**
- * Figure drawn by user with mouse
- *
- * @author marian
- */
- public class Figure implements Serializable
- {
- private static final long serialVersionUID = 8582433437601788991L;
- private final ArrayList<Point> points;
-
- /**
- * Constructor, initialize figure
- */
- public Figure()
- {
- points = new ArrayList<>();
- }
-
- /**
- * Add point to figure
- * @param p new point
- */
- public void addPoint(Point p)
- {
- points.add(p);
- }
-
- /**
- * Get all points of figure
- * @return all points
- */
- public List<Point> getPoints()
- {
- return points;
- }
- }
|