|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.icepdf.ri.common.views.DocumentViewControllerImpl
public class DocumentViewControllerImpl
The DocumentViewControllerImpl is responsible for controlling the four default view models specified by the PDF specification. This class is used associated with the SwingController, but all view specific control is passed to this class.
| Field Summary | |
|---|---|
protected org.icepdf.core.AnnotationCallback |
annotationCallback
|
static java.awt.Color |
backgroundColor
|
protected java.beans.PropertyChangeSupport |
changes
|
protected int |
oldViewportFitMode
|
protected int |
oldViewportHeight
|
protected int |
oldViewportWidth
|
protected int |
oldViewType
|
static int |
ONE_COLUMN_VIEW
Displays a the pages in one column. |
static int |
ONE_PAGE_VIEW
Displays a one page at a time view. |
static float |
ROTATION_FACTOR
Rotation factor used with rotating document. |
protected org.icepdf.core.SecurityCallback |
securityCallback
|
static int |
TWO_COLUMN_LEFT_VIEW
Displays the pages in two columns, with odd-numbered pages on the left. |
static int |
TWO_COLUMN_RIGHT_VIEW
Displays the pages in two columns, with even-numbered pages on the left. |
static int |
TWO_PAGE_LEFT_VIEW
Displays the pages two at a time, with odd-numbered pages on the left. |
static int |
TWO_PAGE_RIGHT_VIEW
Displays the pages two at a time, with event-numbered pages on the left. |
protected SwingController |
viewerController
|
protected int |
viewportFitMode
|
protected int |
viewportHeight
|
protected int |
viewportWidth
|
protected int |
viewType
|
static float |
ZOOM_FACTOR
Zoom factor used when zooming in or out. |
| Fields inherited from interface org.icepdf.core.views.DocumentViewController |
|---|
CURSOR_DEFAULT, CURSOR_HAND_ANNOTATION, CURSOR_HAND_CLOSE, CURSOR_HAND_OPEN, CURSOR_SELECT, CURSOR_TEXT_SELECTION, CURSOR_WAIT, CURSOR_ZOOM_IN, CURSOR_ZOOM_OUT, PAGE_FIT_ACTUAL_SIZE, PAGE_FIT_NONE, PAGE_FIT_WINDOW_HEIGHT, PAGE_FIT_WINDOW_WIDTH |
| Constructor Summary | |
|---|---|
DocumentViewControllerImpl(SwingController viewerController)
|
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
|
void |
assignSelectedAnnotation(org.icepdf.core.views.swing.AnnotationComponentImpl annotationComponent)
|
void |
clearHighlightedText()
Clear highlighted text in all pages that make up the current document |
void |
clearSelectedAnnotations()
|
void |
clearSelectedText()
Clear selected text in all pages that make up the current document |
void |
closeDocument()
|
void |
componentHidden(java.awt.event.ComponentEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation |
void |
componentMoved(java.awt.event.ComponentEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation |
void |
componentResized(java.awt.event.ComponentEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation |
void |
componentShown(java.awt.event.ComponentEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation |
void |
deleteCurrentAnnotation()
|
void |
dispose()
|
void |
firePropertyChange(java.lang.String event,
int oldValue,
int newValue)
|
void |
firePropertyChange(java.lang.String event,
java.lang.Object oldValue,
java.lang.Object newValue)
Fires property change events for Page view UI changes such as: focus gained/lost annotation state change such as move or resize new annotation crreated, currently only for new link annotations |
org.icepdf.core.AnnotationCallback |
getAnnotationCallback()
Gets the annotation callback. |
int |
getCurrentPageDisplayValue()
|
int |
getCurrentPageIndex()
|
org.icepdf.core.pobjects.Document |
getDocument()
|
org.icepdf.core.views.DocumentView |
getDocumentView()
|
org.icepdf.core.views.DocumentViewModel |
getDocumentViewModel()
|
int |
getFitMode()
|
java.awt.Adjustable |
getHorizontalScrollBar()
|
org.icepdf.core.Controller |
getParentController()
|
float |
getRotation()
Returns the zoom factor of the page visualization. |
org.icepdf.core.SecurityCallback |
getSecurityCallback()
Gets the security callback. |
java.lang.String |
getSelectedText()
|
int |
getToolMode()
|
java.awt.Adjustable |
getVerticalScrollBar()
|
java.awt.Container |
getViewContainer()
The controller will own the scrollpane and will insert different views into it. |
java.awt.Cursor |
getViewCursor(int currsorType)
|
int |
getViewMode()
|
float |
getZoom()
|
float[] |
getZoomLevels()
|
boolean |
isToolModeSelected(int viewToolMode)
|
void |
redo()
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
|
void |
requestViewFocusInWindow()
|
void |
selectAllText()
Sets the selectall status flag as true. |
void |
setAnnotationCallback(org.icepdf.core.AnnotationCallback annotationCallback)
Set an annotation callback. |
boolean |
setCurrentPageIndex(int pageIndex)
|
int |
setCurrentPageNext()
|
int |
setCurrentPagePrevious()
|
void |
setDestinationTarget(org.icepdf.core.pobjects.Destination destination)
|
void |
setDocument(org.icepdf.core.pobjects.Document newDocument)
|
void |
setDocumentViewType(int documentView,
int fitMode)
|
boolean |
setFitMode(int fitMode)
|
float |
setRotateLeft()
|
float |
setRotateRight()
|
boolean |
setRotation(float viewRotation)
|
void |
setSecurityCallback(org.icepdf.core.SecurityCallback securityCallback)
|
boolean |
setToolMode(int viewToolMode)
|
void |
setViewCursor(int currsorType)
|
void |
setViewKeyListener(java.awt.event.KeyListener l)
|
void |
setViewType(int documentViewType)
View Builder for known doc view types |
boolean |
setZoom(float viewZoom)
Sets the zoom factor of the page visualization. |
boolean |
setZoomIn()
|
boolean |
setZoomIn(java.awt.Point p)
Increases the current page visualization zoom factor by 20%. |
void |
setZoomLevels(float[] zoomLevels)
|
boolean |
setZoomOut()
|
boolean |
setZoomOut(java.awt.Point p)
Decreases the current page visualization zoom factor by 20%. |
void |
undo()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ONE_PAGE_VIEW
public static final int ONE_COLUMN_VIEW
public static final int TWO_PAGE_LEFT_VIEW
public static final int TWO_COLUMN_LEFT_VIEW
public static final int TWO_PAGE_RIGHT_VIEW
public static final int TWO_COLUMN_RIGHT_VIEW
public static final float ZOOM_FACTOR
public static final float ROTATION_FACTOR
public static java.awt.Color backgroundColor
protected int viewportWidth
protected int oldViewportWidth
protected int viewportHeight
protected int oldViewportHeight
protected int viewType
protected int oldViewType
protected int viewportFitMode
protected int oldViewportFitMode
protected SwingController viewerController
protected org.icepdf.core.AnnotationCallback annotationCallback
protected org.icepdf.core.SecurityCallback securityCallback
protected java.beans.PropertyChangeSupport changes
| Constructor Detail |
|---|
public DocumentViewControllerImpl(SwingController viewerController)
| Method Detail |
|---|
public org.icepdf.core.pobjects.Document getDocument()
getDocument in interface org.icepdf.core.views.DocumentViewControllerpublic void setDocument(org.icepdf.core.pobjects.Document newDocument)
setDocument in interface org.icepdf.core.views.DocumentViewControllerpublic void closeDocument()
closeDocument in interface org.icepdf.core.views.DocumentViewControllerpublic java.awt.Adjustable getHorizontalScrollBar()
getHorizontalScrollBar in interface org.icepdf.core.views.DocumentViewControllerpublic java.awt.Adjustable getVerticalScrollBar()
getVerticalScrollBar in interface org.icepdf.core.views.DocumentViewControllerpublic void setAnnotationCallback(org.icepdf.core.AnnotationCallback annotationCallback)
setAnnotationCallback in interface org.icepdf.core.views.DocumentViewControllerannotationCallback - annotation callback associated with this document
view.public void setSecurityCallback(org.icepdf.core.SecurityCallback securityCallback)
setSecurityCallback in interface org.icepdf.core.views.DocumentViewControllerpublic void clearSelectedAnnotations()
clearSelectedAnnotations in interface org.icepdf.core.views.DocumentViewControllerpublic void assignSelectedAnnotation(org.icepdf.core.views.swing.AnnotationComponentImpl annotationComponent)
assignSelectedAnnotation in interface org.icepdf.core.views.DocumentViewControllerpublic void clearSelectedText()
clearSelectedText in interface org.icepdf.core.views.DocumentViewControllerpublic void clearHighlightedText()
clearHighlightedText in interface org.icepdf.core.views.DocumentViewControllerpublic void selectAllText()
selectAllText in interface org.icepdf.core.views.DocumentViewControllerpublic java.lang.String getSelectedText()
getSelectedText in interface org.icepdf.core.views.DocumentViewControllerpublic org.icepdf.core.AnnotationCallback getAnnotationCallback()
getAnnotationCallback in interface org.icepdf.core.views.DocumentViewControllerpublic org.icepdf.core.SecurityCallback getSecurityCallback()
getSecurityCallback in interface org.icepdf.core.views.DocumentViewControllerpublic org.icepdf.core.views.DocumentView getDocumentView()
public void setViewKeyListener(java.awt.event.KeyListener l)
setViewKeyListener in interface org.icepdf.core.views.DocumentViewControllerpublic void setDestinationTarget(org.icepdf.core.pobjects.Destination destination)
setDestinationTarget in interface org.icepdf.core.views.DocumentViewControllerpublic void dispose()
dispose in interface org.icepdf.core.views.DocumentViewControllerpublic java.awt.Container getViewContainer()
getViewContainer in interface org.icepdf.core.views.DocumentViewControllerpublic org.icepdf.core.Controller getParentController()
getParentController in interface org.icepdf.core.views.DocumentViewControllerpublic int getViewMode()
getViewMode in interface org.icepdf.core.views.DocumentViewControllerpublic void setViewType(int documentViewType)
setViewType in interface org.icepdf.core.views.DocumentViewControllerdocumentViewType - view type,public boolean setFitMode(int fitMode)
setFitMode in interface org.icepdf.core.views.DocumentViewControllerpublic int getFitMode()
getFitMode in interface org.icepdf.core.views.DocumentViewController
public void setDocumentViewType(int documentView,
int fitMode)
setDocumentViewType in interface org.icepdf.core.views.DocumentViewControllerpublic boolean setCurrentPageIndex(int pageIndex)
setCurrentPageIndex in interface org.icepdf.core.views.DocumentViewControllerpublic int setCurrentPageNext()
setCurrentPageNext in interface org.icepdf.core.views.DocumentViewControllerpublic int setCurrentPagePrevious()
setCurrentPagePrevious in interface org.icepdf.core.views.DocumentViewControllerpublic int getCurrentPageIndex()
getCurrentPageIndex in interface org.icepdf.core.views.DocumentViewControllerpublic int getCurrentPageDisplayValue()
getCurrentPageDisplayValue in interface org.icepdf.core.views.DocumentViewControllerpublic float[] getZoomLevels()
getZoomLevels in interface org.icepdf.core.views.DocumentViewControllerpublic void setZoomLevels(float[] zoomLevels)
setZoomLevels in interface org.icepdf.core.views.DocumentViewControllerpublic boolean setZoom(float viewZoom)
setZoom in interface org.icepdf.core.views.DocumentViewControllerviewZoom - zoom factor
public boolean setZoomIn()
setZoomIn in interface org.icepdf.core.views.DocumentViewControllerpublic boolean setZoomOut()
setZoomOut in interface org.icepdf.core.views.DocumentViewControllerpublic float getZoom()
getZoom in interface org.icepdf.core.views.DocumentViewControllerpublic float getRotation()
getRotation in interface org.icepdf.core.views.DocumentViewControllerpublic float setRotateRight()
setRotateRight in interface org.icepdf.core.views.DocumentViewControllerpublic float setRotateLeft()
setRotateLeft in interface org.icepdf.core.views.DocumentViewControllerpublic boolean setRotation(float viewRotation)
setRotation in interface org.icepdf.core.views.DocumentViewControllerpublic boolean setToolMode(int viewToolMode)
setToolMode in interface org.icepdf.core.views.DocumentViewControllerpublic boolean isToolModeSelected(int viewToolMode)
isToolModeSelected in interface org.icepdf.core.views.DocumentViewControllerpublic int getToolMode()
getToolMode in interface org.icepdf.core.views.DocumentViewControllerpublic void setViewCursor(int currsorType)
setViewCursor in interface org.icepdf.core.views.DocumentViewControllerpublic java.awt.Cursor getViewCursor(int currsorType)
getViewCursor in interface org.icepdf.core.views.DocumentViewControllerpublic void requestViewFocusInWindow()
requestViewFocusInWindow in interface org.icepdf.core.views.DocumentViewControllerpublic boolean setZoomIn(java.awt.Point p)
setZoomIn in interface org.icepdf.core.views.DocumentViewControllerp - Recenter the scrollpane herepublic boolean setZoomOut(java.awt.Point p)
setZoomOut in interface org.icepdf.core.views.DocumentViewControllerp - Recenter the scrollpane herepublic org.icepdf.core.views.DocumentViewModel getDocumentViewModel()
getDocumentViewModel in interface org.icepdf.core.views.DocumentViewControllerpublic void componentHidden(java.awt.event.ComponentEvent e)
componentHidden in interface java.awt.event.ComponentListenerpublic void componentMoved(java.awt.event.ComponentEvent e)
componentMoved in interface java.awt.event.ComponentListenerpublic void componentResized(java.awt.event.ComponentEvent e)
componentResized in interface java.awt.event.ComponentListenerpublic void componentShown(java.awt.event.ComponentEvent e)
componentShown in interface java.awt.event.ComponentListener
public void firePropertyChange(java.lang.String event,
int oldValue,
int newValue)
firePropertyChange in interface org.icepdf.core.views.DocumentViewController
public void firePropertyChange(java.lang.String event,
java.lang.Object oldValue,
java.lang.Object newValue)
firePropertyChange in interface org.icepdf.core.views.DocumentViewControllerevent - property being changesoldValue - old value, null if no old valuenewValue - new annotation value.public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
public void deleteCurrentAnnotation()
deleteCurrentAnnotation in interface org.icepdf.core.views.DocumentViewControllerpublic void undo()
undo in interface org.icepdf.core.views.DocumentViewControllerpublic void redo()
redo in interface org.icepdf.core.views.DocumentViewControllerpublic void removePropertyChangeListener(java.beans.PropertyChangeListener l)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||