Class AbstractPageViewComponent

    • Field Detail

      • pageBufferPadding

        protected static int pageBufferPadding
      • progressivePaint

        protected static boolean progressivePaint
      • paintAnnotations

        protected boolean paintAnnotations
      • parentDocumentView

        protected DocumentView parentDocumentView
      • pageIndex

        protected int pageIndex
      • pageZoom

        protected float pageZoom
      • pageRotation

        protected float pageRotation
      • pageBoundaryBox

        protected int pageBoundaryBox
    • Constructor Detail

      • AbstractPageViewComponent

        public AbstractPageViewComponent​(DocumentViewModel documentViewModel,
                                         PageTree pageTree,
                                         int pageIndex,
                                         int width,
                                         int height)
    • Method Detail

      • clearSelectedText

        public void clearSelectedText()
      • setSelectionRectangle

        public void setSelectionRectangle​(Point cursorLocation,
                                          Rectangle selection)
        Sets the text that is contained in the specified rectangle and the given mouse pointer. The cursor and selection rectangle must be in page space.
        Parameters:
        cursorLocation - location of cursor or mouse.
        selection - rectangle of text to include in selection.
      • clearSelectionRectangle

        public void clearSelectionRectangle()
        Clear any internal data structures that represent selected text and repaint the component.
      • reinitialize

        public void reinitialize()
      • getPageIndex

        public int getPageIndex()
        Description copied from interface: PageViewComponent
        Gets the page index which this PageViewComponent is drawing.
        Specified by:
        getPageIndex in interface PageViewComponent
        Returns:
        zero pages page index of the page drawn by this component.
      • getPage

        public Page getPage()
      • setDocumentViewCallback

        public void setDocumentViewCallback​(DocumentView parentDocumentView)
        Description copied from interface: PageViewComponent
        Set the parent Document View class which is responsible for drawing and the general management of PageViewComponents for a particular view.
        Specified by:
        setDocumentViewCallback in interface PageViewComponent
        Parameters:
        parentDocumentView - type of view, single page, continuous, etc.
      • getParentDocumentView

        public DocumentView getParentDocumentView()
      • isAnnotationTool

        public static boolean isAnnotationTool​(int displayTool)
      • updateView

        public void updateView​(String propertyConstant,
                               Object oldValue,
                               Object newValue)
        Called from parent controls when a UI control has manipulated the view, property change is picked up and the view is updated accordingly. Responds to PropertyConstants.DOCUMENT_VIEW_ROTATION_CHANGE and PropertyConstants.DOCUMENT_VIEW_ZOOM_CHANGE. If the worker is currently working is cancel with interrupts.
        Specified by:
        updateView in interface PageViewComponent
        Parameters:
        propertyConstant - document view change property.
        oldValue - old value
        newValue - new value
      • calculatePageSize

        protected void calculatePageSize​(Rectangle pageSize,
                                         float rotation,
                                         float zoom)
        Calculates the page size for the rotation and zoom. The new values are assigned to the pageSize.
        Parameters:
        pageSize - rectangle to update, new rectangle will not be created.
        rotation - rotation of page.
        zoom - zoom of page
      • calculateScaleForDefaultScreen

        protected static double calculateScaleForDefaultScreen()
      • calculateBufferLocation

        protected void calculateBufferLocation()
        Calculates where we should be painting the new buffer and kicks off the worker if the buffer is deemed dirty. The Parent scrollpane viewport is taken into account to set up the clipping.