org.icepdf.core.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
 AnnotationComponent addAnnotation(Annotation annotation)
          Add a new annotation object to this page view comnponent.
 void clearSelectedText()
          Clear any internal data stractures that represent selected text and repaint the component.
 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.
 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 setTextSelectionRectangle(java.awt.Point cursorLocation, java.awt.Rectangle selection)
          Sets the text that is contained in the specified recttangle and the given mouse pointer.
 

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.


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 stractures that represent selected text and repaint the component.


setTextSelectionRectangle

void setTextSelectionRectangle(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.

addAnnotation

AnnotationComponent addAnnotation(Annotation 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.