org.icepdf.ri.common.views
Interface Controller

All Known Implementing Classes:
SwingController

public interface Controller

A Controller is the glue between the model and view components. These methods allow the different parts of the view to remain in lock-step with each other and have access to the model, as necessary

Since:
2.0

Method Summary
 int getCurrentPageNumber()
          When viewing a PDF file, one or more pages may be viewed at a single time, but this page is the single page which is most predominantly being displayed.
 org.icepdf.core.pobjects.Document getDocument()
          A Document is the root of the object hierarchy, giving access to the contents of a PDF file.
 org.icepdf.core.search.DocumentSearchController getDocumentSearchController()
          Gets controller responsible for the document text searches.
 DocumentViewController getDocumentViewController()
          Gets controller responsible for Page view UI interaction.
 java.util.ResourceBundle getMessageBundle()
          Gets the message bundle used by this class.
 float getUserRotation()
          Each Page may have its own rotation, but on top of that, the user may select to have the Page further rotated by 90, 180 or 270 degrees.
 float getUserZoom()
          The Page being shown may be zoomed in or out, to show more detail, or provide an overview.
 void setDocumentToolMode(int toolType)
          Sets the tool mode used for the controller view.
 

Method Detail

getDocument

org.icepdf.core.pobjects.Document getDocument()
A Document is the root of the object hierarchy, giving access to the contents of a PDF file. Significantly, getDocument().getCatalog().getPageTree().getPage(int pageNumber) gives access to each Page, so that it might be drawn.

Returns:
Document root of the PDF file.

getCurrentPageNumber

int getCurrentPageNumber()
When viewing a PDF file, one or more pages may be viewed at a single time, but this page is the single page which is most predominantly being displayed.

Returns:
The zero-based index of the current Page being displayed

getUserRotation

float getUserRotation()
Each Page may have its own rotation, but on top of that, the user may select to have the Page further rotated by 90, 180 or 270 degrees.

Returns:
The user's requested rotation

getUserZoom

float getUserZoom()
The Page being shown may be zoomed in or out, to show more detail, or provide an overview.

Returns:
The user's requested zoom

getDocumentViewController

DocumentViewController getDocumentViewController()
Gets controller responsible for Page view UI interaction.

Returns:
document view controller.

getDocumentSearchController

org.icepdf.core.search.DocumentSearchController getDocumentSearchController()
Gets controller responsible for the document text searches.

Returns:
page view controller.

setDocumentToolMode

void setDocumentToolMode(int toolType)
Sets the tool mode used for the controller view. Tools such as text selection, panning and annotation selection can be used.

Parameters:
toolType - tool mode constants defined in DocumentViewModel

getMessageBundle

java.util.ResourceBundle getMessageBundle()
Gets the message bundle used by this class. Message bundle resources are loaded via the JVM default locale.

Returns:
message bundle used by this class.