Class PageViewComponentImpl

    • Constructor Detail

      • PageViewComponentImpl

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

      • clearSearchHighlights

        public void clearSearchHighlights()
      • setToolMode

        public void setToolMode​(int viewToolMode)
        Sets the tool mode for the current page component implementation. When a tool mode is assigned the respective tool handler is registered and various event listeners are registered.
        Parameters:
        viewToolMode - view tool modes as defined in DocumentViewMode.DISPLAY_TOOL_*
      • getAnnotationComponents

        public ArrayList<AbstractAnnotationComponent> getAnnotationComponents()
        Gets a list of the annotation components used in this page view.
        Returns:
        list of annotation components, can be null.
      • getComponentFor

        public AnnotationComponent getComponentFor​(Annotation annot)
        Returns the annotation component linked to the given annotation
        Parameters:
        annot - The annotation
        Returns:
        The annotation component, or null if there is no match
      • getDestinationComponents

        public ArrayList<DestinationComponent> getDestinationComponents()
        Gets a list of the annotation components used in this page view.
        Returns:
        list of annotation components, can be null.
      • getTextSelectionPageHandler

        public TextSelectionPageHandler getTextSelectionPageHandler()
        Gets the page components TextSelectionPageHandler. Each page has one and it directly accessed by the TextSelectionViewHandler. All other tools are created/disposed as the tools are selected.
        Returns:
        page's instance of the text selection handler.
      • getCurrentToolHandler

        public ToolHandler getCurrentToolHandler()
      • updateView

        public void updateView​(String propertyConstant,
                               Object oldValue,
                               Object newValue)
        Description copied from class: AbstractPageViewComponent
        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
        Overrides:
        updateView in class AbstractPageViewComponent
        Parameters:
        propertyConstant - document view change property.
        oldValue - old value
        newValue - new value
      • addAnnotation

        public void addAnnotation​(AnnotationComponent annotation)
        Add a new annotation object to this page view component.
        Parameters:
        annotation - annotation to add.
      • removeAnnotation

        public void removeAnnotation​(AnnotationComponent annotationComp)
        Remove the specified annotation from this page view.
        Parameters:
        annotationComp - annotation to be removed.
      • pageInitializedCallback

        public void pageInitializedCallback​(Page page)
        Description copied from interface: PageViewComponent
        This callback is called when the page is successfully initialized at which point an implementation may like to work with the page object before the parent method turns. This method should return as quickly as possible.
        Specified by:
        pageInitializedCallback in interface PageViewComponent
        Parameters:
        page - page that was just initialized.
      • pageTeardownCallback

        public void pageTeardownCallback()
        Description copied from interface: PageViewComponent
        This callback is called when a page is scheduled for dispose. This generally only happens when the page goes out of view and it and it's resources are no longer needed. This method in the default implementation is executed on a worker thread. Any AWT work should be queued to run on the AWT thread.
        Specified by:
        pageTeardownCallback in interface PageViewComponent
      • refreshDestinationComponents

        public void refreshDestinationComponents​(Page page)
      • refreshDestinationComponents

        public void refreshDestinationComponents​(Page page,
                                                 boolean invokeLater)
      • refreshAnnotationComponents

        public void refreshAnnotationComponents​(Page page)
      • refreshAnnotationComponents

        public void refreshAnnotationComponents​(Page page,
                                                boolean invokeLater)