Package org.faceless.pdf2.viewer2
Class DocumentPanelEvent
- java.lang.Object
-
- org.faceless.pdf2.viewer2.DocumentPanelEvent
-
public class DocumentPanelEvent extends Object
Represents an event on aDocumentPanelindicating that document has changed somehow. To capture these events, implement theDocumentPanelListenerinterface and register via theDocumentPanel.addDocumentPanelListener()method. Be sure to check thegetType()method to see what sort of event it is - current values include:
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.created Raised when the DocumentPanel is first created activated Raised when the DocumentPanel is activated with a valid PDF deactivated Raised when the DocumentPanel is deactivated viewportChanged Raised when the DocumentPanel has a new DocumentViewportapplied to itloaded Raised after a PDF is loaded closing Raised when the PDF is closing redrawn Raised when the PDF has been redrawn somehow pageChanged Raised when the DocumentPanel changes which page is being displayed pagePositionChanged Raised when the DocumentPanel changes which area of the page is being displayed stateChanged Raised when the DocumentPanel's PDF has had its state changed. This event will be fired when the state of the document is updated in the current context - for instance, if the viewer validates a signature, or verifies a document against an OutputProfile. The nature of the change should be determined from the associated object. It's not for inherent changes to the document (such as when a page is removed) which result in aPropertyChangeEventfrom the PDF or one of its components.permissionChanged Raised when the DocumentPanel's PDF has had its permissions changed. 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DocumentPanelEventcreateActivated(DocumentPanel panel)Create an "activated" DocumentPanelEventstatic DocumentPanelEventcreateClosing(DocumentPanel panel)Create a "closing" DocumentPanelEventstatic DocumentPanelEventcreateCreated(DocumentPanel panel)Create a "created" DocumentPanelEventstatic DocumentPanelEventcreateDeactivated(DocumentPanel panel)Create a "deactivated" DocumentPanelEventstatic DocumentPanelEventcreateLoaded(DocumentPanel panel)Create a "loaded" DocumentPanelEventstatic DocumentPanelEventcreatePageChanged(DocumentPanel panel)Create a "pageChanged" DocumentPanelEventstatic DocumentPanelEventcreatePagePositionChanged(DocumentPanel panel)Create a "pagePositionChanged" DocumentPanelEventstatic DocumentPanelEventcreatePermissionChanged(DocumentPanel panel, String permission)Create a "permissionChanged" DocumentPanelEventstatic DocumentPanelEventcreateRedrawn(DocumentPanel panel)Create a "redrawn" DocumentPanelEventstatic DocumentPanelEventcreateStateChanged(DocumentPanel panel, Object state)Create a "stateChanged" DocumentPanelEventstatic DocumentPanelEventcreateViewportChanged(DocumentPanel panel)Create a "viewportChanged" DocumentPanelEventDocumentPanelgetDocumentPanel()Get the DocumentPanel this event was raised onObjectgetState()Get the state associated with a "stateChange" events.StringgetType()Get the type of the DocumentPanelEventStringtoString()
-
-
-
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 "pagePositionChanged" DocumentPanelEvent
-
createPermissionChanged
public static DocumentPanelEvent createPermissionChanged(DocumentPanel panel, String permission)
Create a "permissionChanged" 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
-
createStateChanged
public static DocumentPanelEvent createStateChanged(DocumentPanel panel, Object state)
Create a "stateChanged" DocumentPanelEvent- Parameters:
state- the state that has changed.- Since:
- 2.12
-
getDocumentPanel
public DocumentPanel getDocumentPanel()
Get the DocumentPanel this event was raised on
-
getType
public String getType()
Get the type of the DocumentPanelEvent
-
getState
public Object getState()
Get the state associated with a "stateChange" events. The type of object can be used to determine the change - for instance, aSignatureProvider.SignatureStatewill indicated a change to the validation state of one of the docuemnt's signatures.- Since:
- 2.12
-
-