com.teamdev.jxdocument
Class DocumentPresentation

java.lang.Object
  extended by com.teamdev.jxdocument.DocumentPresentation
Direct Known Subclasses:
SinglePagePresentation

public abstract class DocumentPresentation
extends java.lang.Object

Represents GUI component that can be used to display PDF Document or specified Page in Java Swing applications. Different implementations may provide different ways of how PDF Document should be displayed. All implementations must implement the getComponent() method and return JComponent instance that will be used for displaying PDF Document.


Constructor Summary
DocumentPresentation(Document document)
          Constructs a new DocumentPresentation instance for specified document.
 
Method Summary
abstract  javax.swing.JComponent getComponent()
          Returns Java Swing component that can display PDF Document.
 Document getDocument()
          Returns a Document instance that is associated with the current presentation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentPresentation

public DocumentPresentation(Document document)
Constructs a new DocumentPresentation instance for specified document.

Throws:
java.lang.IllegalArgumentException - when document is null.
Method Detail

getDocument

public Document getDocument()
Returns a Document instance that is associated with the current presentation.

Returns:
a Document instance that is associated with the current presentation.

getComponent

public abstract javax.swing.JComponent getComponent()
Returns Java Swing component that can display PDF Document. Each implementation of the current abstract class decides itself how exactly PDF Document will be displayed: only single page is displayed, the whole document with scrolling, two page at one screen etc.

Returns:
Swing component that displays PDF Document.