org.faceless.pdf2.viewer2

## Class ViewerEvent

- java.lang.Object
- - org.faceless.pdf2.viewer2.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 Summary

    Constructors
    Constructor and Description
    `ViewerEvent(ActionEvent event, PDFViewer viewer)`
    `ViewerEvent(PDFViewer viewer, DocumentPanel panel)` Create a new ViewerEvent manually

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Component` | `getComponent()` Return the Component this event was raised on (for manually created events this returns null)
    `DocumentPanel` | `getDocumentPanel()` Return the active `DocumentPanel` of the PDFViewer, or `null` if no DocumentPanel is active.
    `PDF` | `getPDF()` Return the `PDF` of the DocumentPanel
    `PDFViewer` | `getViewer()` Return the viewer this Event was raised on

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ViewerEvent

          public ViewerEvent(ActionEvent event,
                             PDFViewer viewer)

    - #### 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)

Copyright © 2001-2015 Big Faceless Organization