Class ViewerEvent


  • public class ViewerEvent
    extends Object
    An event which is raised by the Viewer when a ViewerWidget is activated. This is passed to the ViewerWidget.action(org.faceless.pdf2.viewer2.ViewerEvent) method for processing.

    This code is copyright the Big Faceless Organization. You're welcome to use, modify and distribute it in any form in your own projects, provided those projects continue to make use of the Big Faceless PDF library.

    Since:
    2.8
    • Constructor Detail

      • ViewerEvent

        public ViewerEvent​(PDFViewer viewer,
                           DocumentPanel panel)
        Create a new ViewerEvent manually
        Parameters:
        viewer - the PDFViewer the event relates to
        panel - the DocumentPanel the event relates to
    • Method Detail

      • getViewer

        public PDFViewer getViewer()
        Return the viewer this Event was raised on
      • getDocumentPanel

        public DocumentPanel getDocumentPanel()
        Return the active DocumentPanel of the PDFViewer, or null if no DocumentPanel is active.
      • getPDF

        public PDF getPDF()
        Return the PDF of the DocumentPanel
      • getComponent

        public Component getComponent()
        Return the Component this event was raised on (for manually created events this returns null)