org.icepdf.ri.common.views
Interface PageViewComponent

All Known Implementing Classes:
AbstractPageViewComponent, PageViewComponentImpl

public interface PageViewComponent

The PageViewComponent interaces 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 addAnnotation(AnnotationComponent annotation)
          Add a new annotation object to this page view comnponent.
 void clearSelectedText()
          Clear any internal data structures that represent selected text and repaint the component.
 void clearSelectionRectangle()
           
 void dispose()
          Called to free resources used by this component.
 int getPageIndex()
          Gets the page index which this PageViewComponent is drawing.
 void init()
          Called to initialize resources used by this class.
 void invalidate()
          Called to invalidate the component.
 void invalidatePage()
          Invalidates the underling document page and resepctive resources.
 void invalidatePageBuffer()
          Invalidates the page buffer used for bufferer paints forcing a clean repaint of the pge.
 boolean isShowing()
          Indicates that the page is showing;
 void removeAnnotation(AnnotationComponent annotationComp)
          Remove the specified annotation from this page view.
 void setDocumentViewCallback(DocumentView parentDocumentView)
          Set the parent Document View class which is resbonsible for drawing and the general management of PageViewComponents for a particular view.
 void setSelectionRectangle(java.awt.Point cursorLocation, java.awt.Rectangle selection)
          Sets the text that is contained in the specified recttangle and the given mouse pointer.
 void setToolMode(int viewToolMode)
           
 

Method Detail

setDocumentViewCallback

void setDocumentViewCallback(DocumentView parentDocumentView)
Set the parent Document View class which is resbonsible 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.

init

void init()
Called to initialize resources used by this class.


invalidatePage

void invalidatePage()
Invalidates the underling document page and resepctive resources. Subsiquent page calls will reinitialize the page data.


invalidatePageBuffer

void invalidatePageBuffer()
Invalidates the page buffer used for bufferer paints forcing a clean repaint of the pge. .


dispose

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


invalidate

void invalidate()
Called to invalidate the component.


isShowing

boolean isShowing()
Indicates that the page is showing;

Returns:
true if the page is showing, otherwise; false.

clearSelectedText

void clearSelectedText()
Clear any internal data structures that represent selected text and repaint the component.


setSelectionRectangle

void setSelectionRectangle(java.awt.Point cursorLocation,
                           java.awt.Rectangle selection)
Sets the text that is contained in the specified recttangle and the given mouse pointer. The cursor and selection rectangel must be in in page space.

Parameters:
cursorLocation - location of cursor or mouse.
selection - rectangle of text to include in selection.

clearSelectionRectangle

void clearSelectionRectangle()

addAnnotation

void addAnnotation(AnnotationComponent annotation)
Add a new annotation object to this page view comnponent.

Parameters:
annotation - annotation to add.

removeAnnotation

void removeAnnotation(AnnotationComponent annotationComp)
Remove the specified annotation from this page view.

Parameters:
annotationComp - annotation to be removed.

setToolMode

void setToolMode(int viewToolMode)