Class WhiteboardRenderer<T extends android.view.View & ZoomableSharingView>

    • Constructor Detail

      • WhiteboardRenderer

        public WhiteboardRenderer()
    • Method Detail

      • setZoomableImageView

        @Deprecated
        public void setZoomableImageView​(ZoomableImageView zoomableImageView)
        Deprecated.
        Sets view with zoom and pinch for incoming drawings from server.
        Parameters:
        zoomableImageView - zoomable image view object.
      • setSharingView

        public void setSharingView​(T sharingView)
        Sets view with zoom and pinch for incoming drawings from server.
        Parameters:
        sharingView - sharing view object.
      • setDrawingView

        public void setDrawingView​(DrawingView drawingView)
        Sets view for user drawings.
        Parameters:
        drawingView - drawing view object.
      • setActiveWhiteboardSurface

        public void setActiveWhiteboardSurface​(WhiteboardSurface surface)
        Sets whiteboard surface as active and draws all its shape on canvas.
        Parameters:
        surface - object to be active.
      • getActiveWhiteboardSurface

        public WhiteboardSurface getActiveWhiteboardSurface()
        Returns the active whiteboard surface. A value of null is returned in case if the whiteboard session hasn't been started or is ended.
        Returns:
        active whiteboard surface.
      • requestNewSurface

        public void requestNewSurface()
        Request for creating new whiteboard surface. In case of success whiteboard renderer will show on its ZoomableSharingView view newly created WhiteboardSurface whiteboard surface.
      • removeWhiteboardSurface

        public void removeWhiteboardSurface​(WhiteboardSurface surface)
        Request for removing whiteboard surface. User could not remove last whiteboard surface.
        Parameters:
        surface - whiteboard surface to remove.
      • showActiveWhiteboardSurface

        public void showActiveWhiteboardSurface()
        Displays active surface and its shapes on canvas in the case when whiteboard session was initialized before and is active.
      • getWhiteboardSurfaces

        public java.util.List<WhiteboardSurface> getWhiteboardSurfaces()
        Returns all WhiteboardSurface whiteboard surfaces associated with current whiteboard session.
        Returns:
        list of whiteboard surface objects.
      • setDrawingColor

        public void setDrawingColor​(Color color)
        Sets actual color for the drawn shapes. Cannot be null.
        Parameters:
        color - new drawing color.
        Throws:
        java.lang.IllegalStateException - in case when whiteboard views are not properly initialized in renderer object.
      • setDrawingTool

        public void setDrawingTool​(DrawingTool drawingTool)
        Sets new drawing tool. Cannot be null.
        Parameters:
        drawingTool - new drawing tool.
        Throws:
        java.lang.IllegalStateException - in the case when whiteboard views are not properly initialized in renderer object.
      • clearWhiteboard

        public void clearWhiteboard()
        Clears whiteboard active surface. Result of this operation will be displayed on ZoomableSharingView internally by renderer. If the whiteboard session is not started, this method does nothing.
      • stopWhiteboardSharing

        public void stopWhiteboardSharing()
        Stops current whiteboard session. If the whiteboard session is not started, this method does nothing.
      • isWhiteboardStarted

        public boolean isWhiteboardStarted()
        To get the correct value this method requires one to register a whiteboard renderer object as a listener on Whiteboard object from Collaboration object returned on CollaborationListener.onCollaborationStarted method callback.
        Returns:
        true if whiteboard session was started, otherwise false.
      • getWhiteboardHeight

        public int getWhiteboardHeight()
        Whiteboard renderer internally stores Whiteboard this method returns height of the whiteboard object.
        Returns:
        whiteboard height if whiteboard object is valid and height is positive integer, othervise returns default value.
      • getWhiteboardWidth

        public int getWhiteboardWidth()
        Whiteboard renderer internally stores Whiteboard this method returns width of the whiteboard object.
        Returns:
        whiteboard width if whiteboard object is valid and width is positive integer, othervise returns default value.
      • onTouch

        public boolean onTouch​(android.view.View v,
                               android.view.MotionEvent event)
        Specified by:
        onTouch in interface android.view.View.OnTouchListener