org.faceless.pdf2.viewer2
Class DocumentPanelEvent

java.lang.Object
  extended by org.faceless.pdf2.viewer2.DocumentPanelEvent

public class DocumentPanelEvent
extends Object

Represents an event on a DocumentPanel indicating that document has changed somehow. To capture these events, implement the DocumentPanelListener interface and register via the DocumentPanel.addDocumentPanelListener() method. Be sure to check the getType() method to see what sort of event it is - current values include:

createdRaised when the DocumentPanel is first created
activatedRaised when the DocumentPanel is activated with a valid PDF
deactivatedRaised when the DocumentPanel is deactivated
viewportChangedRaised when the DocumentPanel has a new DocumentViewport applied to it
loadedRaised after a PDF is loaded
closingRaised when the PDF is closing
redrawnRaised when the PDF has been redrawn somehow
pageChangedRaised when the DocumentPanel changes which page is being displayed
pagePositionChangedRaised when the DocumentPanel changes which area of the page is being displayed
DocumentPanelEvent's are created with the static "create" methods, but unless you are implementing your own Viewport, there is probably no need to call these methods.

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

Method Summary
static DocumentPanelEvent createActivated(DocumentPanel panel)
          Create an "activated" DocumentPanelEvent
static DocumentPanelEvent createClosing(DocumentPanel panel)
          Create a "closing" DocumentPanelEvent
static DocumentPanelEvent createCreated(DocumentPanel panel)
          Create a "created" DocumentPanelEvent
static DocumentPanelEvent createDeactivated(DocumentPanel panel)
          Create a "deactivated" DocumentPanelEvent
static DocumentPanelEvent createLoaded(DocumentPanel panel)
          Create a "loaded" DocumentPanelEvent
static DocumentPanelEvent createPageChanged(DocumentPanel panel)
          Create a "pageChanged" DocumentPanelEvent
static DocumentPanelEvent createPagePositionChanged(DocumentPanel panel)
          Create a "pagePositionChagned" DocumentPanelEvent
static DocumentPanelEvent createRedrawn(DocumentPanel panel)
          Create a "redrawn" DocumentPanelEvent
static DocumentPanelEvent createViewportChanged(DocumentPanel panel)
          Create a "viewportChanged" DocumentPanelEvent
 DocumentPanel getDocumentPanel()
          Get the DocumentPanel this event was raised on
 String getType()
          Get the type of the DocumentPanelEvent
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

createCreated

public static DocumentPanelEvent createCreated(DocumentPanel panel)
Create a "created" DocumentPanelEvent


createActivated

public static DocumentPanelEvent createActivated(DocumentPanel panel)
Create an "activated" DocumentPanelEvent


createDeactivated

public static DocumentPanelEvent createDeactivated(DocumentPanel panel)
Create a "deactivated" DocumentPanelEvent


createViewportChanged

public static DocumentPanelEvent createViewportChanged(DocumentPanel panel)
Create a "viewportChanged" DocumentPanelEvent


createPageChanged

public static DocumentPanelEvent createPageChanged(DocumentPanel panel)
Create a "pageChanged" DocumentPanelEvent


createPagePositionChanged

public static DocumentPanelEvent createPagePositionChanged(DocumentPanel panel)
Create a "pagePositionChagned" DocumentPanelEvent


createLoaded

public static DocumentPanelEvent createLoaded(DocumentPanel panel)
Create a "loaded" DocumentPanelEvent


createClosing

public static DocumentPanelEvent createClosing(DocumentPanel panel)
Create a "closing" DocumentPanelEvent


createRedrawn

public static DocumentPanelEvent createRedrawn(DocumentPanel panel)
Create a "redrawn" DocumentPanelEvent


toString

public String toString()
Overrides:
toString in class Object

getDocumentPanel

public DocumentPanel getDocumentPanel()
Get the DocumentPanel this event was raised on


getType

public String getType()
Get the type of the DocumentPanelEvent



Copyright © 2001-2010 Big Faceless Organization