org.icepdf.ri.common.views
Interface PageViewComponent

All Known Implementing Classes:
AbstractPageViewComponent, PageThumbnailComponent, PageViewComponentImpl

public interface PageViewComponent

The PageViewComponent interfaces should be used by any page view implementation to represent a single page view. The methods defined in this interface are the most commonly used methods and are used by the AbstractDocumentView and AbstractDocumentViewModel.

Since:
2.0
See Also:
PageViewComponentImpl

Method Summary
 void dispose()
          Called to free resources used by this component.
 int getPageIndex()
          Gets the page index which this PageViewComponent is drawing.
 void pageInitializedCallback(org.icepdf.core.pobjects.Page page)
          This callback is called when the page is successfully initialized at which point an implementation may like to work with the page object before the parent method turns.
 void pageTeardownCallback()
          This callback is called when a page is scheduled for dispose.
 void setDocumentViewCallback(DocumentView parentDocumentView)
          Set the parent Document View class which is responsible for drawing and the general management of PageViewComponents for a particular view.
 void updateView(java.lang.String propertyConstant, java.lang.Object oldValue, java.lang.Object newValue)
          Called from parent controls when a UI control has manipulated the view, property change is picked up and the view is updated accordingly.
 

Method Detail

setDocumentViewCallback

void setDocumentViewCallback(DocumentView parentDocumentView)
Set the parent Document View class which is responsible for drawing and the general management of PageViewComponents for a particular view.

Parameters:
parentDocumentView - type of view, single page, continuous, etc.

getPageIndex

int getPageIndex()
Gets the page index which this PageViewComponent is drawing.

Returns:
zero pages page index of the page drawn by this component.

dispose

void dispose()
Called to free resources used by this component.


updateView

void updateView(java.lang.String propertyConstant,
                java.lang.Object oldValue,
                java.lang.Object newValue)
Called from parent controls when a UI control has manipulated the view, property change is picked up and the view is updated accordingly. If the worker is currently working it should be canceled with an interrupt.

Parameters:
propertyConstant - document view change property.
oldValue - old value
newValue - new value

pageInitializedCallback

void pageInitializedCallback(org.icepdf.core.pobjects.Page page)
This callback is called when the page is successfully initialized at which point an implementation may like to work with the page object before the parent method turns. This method should return as quickly as possible.

Parameters:
page - page that was just initialized.

pageTeardownCallback

void pageTeardownCallback()
This callback is called when a page is scheduled for dispose. This generally only happens when the page goes out of view and it and it's resources are no longer needed. This method in the default implementation is executed on a worker thread. Any AWT work should be queued to run on the AWT thread.