Class Shape


  • public class Shape
    extends AbstractShape

    Shape objects represent free shape that can be added to whiteboard surface.

    This object is built with points which can be connected or not. Client doesn't need to use this class explicitly unless a custom whiteboard is developed.

    See Also:
    WhiteboardSurface
    • Method Detail

      • updatePoints

        public void updatePoints​(java.util.List<Point> points)
        Updates shape with an array of new points.
        Parameters:
        points - list containing Point objects (from which it is created) to update.
      • finishDrawing

        public void finishDrawing()
        Finishes drawing shape.
      • getShapePoints

        public java.util.List<Point> getShapePoints()
        Returns list containing Point shape points from which it is created.
        Returns:
        list of points.
      • getShapeTranslatedPoints

        public java.util.List<Point> getShapeTranslatedPoints()
        Returns list containing Point shape points where each point is moved respectively to current shape translation.
        Returns:
        list of translated points.
      • isFinished

        public boolean isFinished()
        Indicates whether shape is finished.
        Returns:
        true if shape is finished, otherwise false.
      • isFilled

        public boolean isFilled()
        Indicates whether shape is filled.
        Returns:
        true if shape is filled, otherwise false.