Class AbstractShape

  • Direct Known Subclasses:
    Circle, Shape, Text

    public abstract class AbstractShape
    extends java.lang.Object

    Base class for shapes that can be drawn on WhiteboardSurface whiteboard surface.

    Client doesn't need to use this class explicitly unless a custom whiteboard is developed.

    See Also:
    Shape, Text, Circle
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  AbstractShape.ShapeStatus
      Enum indicating selection status of AbstractShape on the server side, in other words, if our action is confirmed by server.
    • Method Detail

      • getId

        public java.lang.String getId()
        The shape ID associated with the particular shape object.
        Returns:
        shape ID.
      • getTranslation

        public Point getTranslation()
        Translation point of shape.
        Returns:
        translation point.
        See Also:
        setTranslation(Point)
      • setTranslation

        public void setTranslation​(Point point)
        Sets translation of shape.
        Parameters:
        point - translation.
        See Also:
        getTranslation()
      • getColor

        public Color getColor()
        Color of shape in ARGB format. Alpha is stored in most significant bit.
        Returns:
        ARGB representation of the color.
      • getWidth

        public int getWidth()
        The line width of shape.
        Returns:
        line width.
      • getOwnerDisplayName

        public java.lang.String getOwnerDisplayName()
        Display name of user who created shape.
        Returns:
        user name.
      • isMine

        public boolean isMine()
        Returns true whether shape is created by local user, otherwise false and it means that the shape is created by a remote user.
        Returns:
        true if shape is created by local user, otherwise false.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object