org.icepdf.ri.common.views
Interface DocumentView

All Superinterfaces:
java.awt.event.AdjustmentListener, java.util.EventListener, java.awt.event.FocusListener
All Known Implementing Classes:
AbstractDocumentView, CollectionDocumentView, OneColumnPageView, OnePageView, TwoColumnPageView, TwoPageView

public interface DocumentView
extends java.awt.event.AdjustmentListener, java.awt.event.FocusListener

The DocumentView interface should be used when create a new multipage view.

Since:
2.5
See Also:
AbstractDocumentView

Field Summary
static int LEFT_VIEW
          Indicates that a two column view will have odd-numbered pages on the left.
static int RIGHT_VIEW
          Indicates that a two column view will have odd-numbered pages on the right.
 
Method Summary
 void dispose()
          Dispose all resources associated with this views.
 java.awt.Dimension getDocumentSize()
          Gets the total size of the document view.
 int getNextPageIncrement()
          Get the next page index.
 DocumentViewController getParentViewController()
          Parent document view controller
 int getPreviousPageIncrement()
          Get the previous page index.
 DocumentViewModel getViewModel()
          Gets the view model associated with this document view.
 void setToolMode(int viewToolMode)
          Sets the tool type/mode that is to be enabled for the particular view.
 void updateDocumentView()
          Update the child components which make up this view.
 
Methods inherited from interface java.awt.event.AdjustmentListener
adjustmentValueChanged
 
Methods inherited from interface java.awt.event.FocusListener
focusGained, focusLost
 

Field Detail

LEFT_VIEW

static final int LEFT_VIEW
Indicates that a two column view will have odd-numbered pages on the left.

See Also:
Constant Field Values

RIGHT_VIEW

static final int RIGHT_VIEW
Indicates that a two column view will have odd-numbered pages on the right.

See Also:
Constant Field Values
Method Detail

getNextPageIncrement

int getNextPageIncrement()
Get the next page index. This will number will very depending on the page view type. Two column page views usually increment page counts by 2 and single page views by 1 page.

Returns:
number of pages to increment page count on a page increment command.

getPreviousPageIncrement

int getPreviousPageIncrement()
Get the previous page index. This will number will very depending on the page view type. Two column page views usually increment page counts by 2 and single page views by 1 page.

Returns:
number of pages to increment page count on a page increment command.

getDocumentSize

java.awt.Dimension getDocumentSize()
Gets the total size of the document view. This size will very depending on the view type. The size dimension has been normalized to a zoom factor of 1.0f and rotation is taken care off.

Returns:
size of document in pixels for all pages represented in the view.

getParentViewController

DocumentViewController getParentViewController()
Parent document view controller

Returns:
document view controller

getViewModel

DocumentViewModel getViewModel()
Gets the view model associated with this document view.

Returns:
document view model used by this view.

dispose

void dispose()
Dispose all resources associated with this views.


updateDocumentView

void updateDocumentView()
Update the child components which make up this view.


setToolMode

void setToolMode(int viewToolMode)
Sets the tool type/mode that is to be enabled for the particular view. Mouse and keyboard listeners are associated with this call. No actual state is stored in the view this is only for setup purposes. The tool state is stored in the DocumentViewModel.

Parameters:
viewToolMode - tool mode type.