Interface WhiteboardSurface

  • All Known Subinterfaces:
    Slide

    public interface WhiteboardSurface

    The WhiteboardSurface object represents an independent whiteboard surface (page) containing all shapes drawn on a given whiteboard surface.

    Whiteboard surface content is displayed through the WhiteboardRenderer. Client can obtain objects of this class using methods of class Whiteboard.

    Drawing of particular shapes should be done using the WhiteboardRenderer, remember to properly initialize it.

    Methods related to adding/modifying/removing particular shapes shouldn't be invoked by client explicitly unless a custom whiteboard canvas is developed.

    See Also:
    Whiteboard, WhiteboardRenderer
    • Method Detail

      • addListener

        void addListener​(WhiteboardSurfaceListener listener)
        Adds a new whiteboard surface listener.
        Parameters:
        listener - listener to be added.
      • removeListener

        void removeListener​(WhiteboardSurfaceListener listener)
        Removes a whiteboard surface listener.
        Parameters:
        listener - listener to be removed.
      • getSurfaceId

        java.lang.String getSurfaceId()
        Returns whiteboard surface id.
        Returns:
        whiteboard surface id.
      • getShapes

        java.util.List<AbstractShape> getShapes()
        Returns all shapes currently on this surface.
        Returns:
        all shapes currently on this surface.
      • setAsActive

        void setAsActive​(WhiteboardCompletionHandler handler)
        Selects this surface as the active whiteboard surface. Only one surface can be active during a collaboration session.
        Parameters:
        handler - object that wants to learn about the result of the operation, i.e., whether it was successful or not.
      • clearContent

        void clearContent​(WhiteboardCompletionHandler handler)
        Removes all content from the drawing surface.
        Parameters:
        handler - object that wants to learn about the result of the operation, i.e., whether it was successful or not.
      • addShape

        Shape addShape​(java.util.List<Point> points,
                       boolean isFilled,
                       boolean isFinished,
                       Color color,
                       int width,
                       WhiteboardCompletionHandler handler)
        Adds a shape to the whiteboard surface.
        Parameters:
        points - list of point objects which represents whole shape.
        isFilled - is this shape filled by Color object.
        isFinished - is this shape already drawn (ex. line can be continuously drawn).
        color - color to fill the shape.
        width - of shape.
        handler - object that wants to learn about the result of the operation, i.e., whether it was successful or not.
        Returns:
        shape object which will be drawn on the whiteboard surface.
      • addCircle

        Circle addCircle​(Point topLeft,
                         Point bottomRight,
                         boolean isFilled,
                         Color color,
                         int width,
                         WhiteboardCompletionHandler handler)
        Adds a circle to the whiteboard surface.
        Parameters:
        topLeft - represents start point of circle from which it will be drawn.
        bottomRight - represents end point of circle.
        isFilled - is this circle filled by Color object.
        color - color to fill the circle.
        width - of circle.
        handler - object that wants to learn about the result of the operation, i.e., whether it was successful or not.
        Returns:
        circle object which will be drawn on the whiteboard surface.
      • addText

        Text addText​(Point position,
                     java.lang.String content,
                     Color color,
                     int fontSize,
                     WhiteboardCompletionHandler handler)
        Adds a text to the whiteboard surface on the indicated position on the page.
        Parameters:
        position - coordinates - position on whiteboard.
        content - represents text to be drawn.
        color - color to fill the text.
        fontSize - font size of text.
        handler - object that wants to learn about the result of the operation, i.e., whether it was successful or not.
        Returns:
        text object which will be drawn on the whiteboard surface.
      • updateShape

        void updateShape​(AbstractShape shape,
                         WhiteboardCompletionHandler handler)
        Continues a shape or moves a selection.
        Parameters:
        shape - shape object to update
        handler - object that wants to learn about the result of the operation, i.e., whether it was successful or not.
      • finishShape

        void finishShape​(AbstractShape shape,
                         WhiteboardCompletionHandler handler)
        Finishes drawing AbstractShape object, ex. line can be continuously drawn and this indicates that this object is fully drawn.
        Parameters:
        shape - shape object which is fully drawn.
        handler - object that wants to learn about the result of the operation, i.e., whether it was successful or not.
      • deleteShape

        void deleteShape​(AbstractShape shape,
                         WhiteboardCompletionHandler handler)
        Deletes a selected shape.
        Parameters:
        shape - shape object to be deleted.
        handler - object that wants to learn about the result of the operation, i.e., whether it was successful or not.
      • getSetAsActiveCapability

        Capability getSetAsActiveCapability()
        Capability object indicating whether the local user is allowed to set given whiteboard surface active. To do so, the local user needs to be moderator, presenter or panel model mode has to be enabled.
        Returns:
        capability information