|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.icesoft.pdf.ri.common.views.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 AnnotationCallback |
annotationCallback
|
protected 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. |
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 com.icesoft.pdf.views.DocumentViewController |
CURSOR_DEFAULT, CURSOR_HAND_ANNOTATION, CURSOR_HAND_CLOSE, CURSOR_HAND_OPEN, CURSOR_SELECT, 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(PropertyChangeListener l)
|
void |
closeDocument()
|
void |
componentHidden(ComponentEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation |
void |
componentMoved(ComponentEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation |
void |
componentResized(ComponentEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation |
void |
componentShown(ComponentEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation |
void |
dispose()
|
void |
firePropertyChange(String event,
int oldValue,
int newValue)
|
AnnotationCallback |
getAnnotationCallback()
Gets the annotation callback. |
int |
getCurrentPageDisplayValue()
|
int |
getCurrentPageIndex()
|
Document |
getDocument()
|
DocumentView |
getDocumentView()
|
int |
getFitMode()
|
Adjustable |
getHorizontalScrollBar()
|
Controller |
getParentController()
|
float |
getRotation()
Returns the zoom factor of the page visualization. |
int |
getToolMode()
|
Adjustable |
getVerticalScrollBar()
|
Container |
getViewContainer()
The controller will own the scrollpane and will insert different views into it. |
Cursor |
getViewCursor(int currsorType)
|
int |
getViewMode()
|
float |
getZoom()
|
float[] |
getZoomLevels()
|
boolean |
isToolModeSelected(int viewToolMode)
|
void |
removePropertyChangeListener(PropertyChangeListener l)
|
void |
requestViewFocusInWindow()
|
void |
setAnnotationCallback(AnnotationCallback annotationCallback)
Set an annotation callback. |
boolean |
setCurrentPageIndex(int pageIndex)
|
int |
setCurrentPageNext()
|
int |
setCurrentPagePrevious()
|
void |
setDestinationTarget(Destination destination)
|
void |
setDocument(Document newDocument)
|
void |
setDocumentViewType(int documentView,
int fitMode)
|
boolean |
setFitMode(int fitMode)
|
float |
setRotateLeft()
|
float |
setRotateRight()
|
boolean |
setRotation(float viewRotation)
|
boolean |
setToolMode(int viewToolMode)
|
void |
setViewCursor(int currsorType)
|
void |
setViewKeyListener(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(Point p)
Increases the current page visualization zoom factor by 20%. |
void |
setZoomLevels(float[] zoomLevels)
|
boolean |
setZoomOut()
|
boolean |
setZoomOut(Point p)
Decreases the current page visualization zoom factor by 20%. |
| 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
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 AnnotationCallback annotationCallback
protected PropertyChangeSupport changes
| Constructor Detail |
public DocumentViewControllerImpl(SwingController viewerController)
| Method Detail |
public Document getDocument()
getDocument in interface DocumentViewControllerpublic void setDocument(Document newDocument)
setDocument in interface DocumentViewControllerpublic void closeDocument()
closeDocument in interface DocumentViewControllerpublic Adjustable getHorizontalScrollBar()
getHorizontalScrollBar in interface DocumentViewControllerpublic Adjustable getVerticalScrollBar()
getVerticalScrollBar in interface DocumentViewControllerpublic void setAnnotationCallback(AnnotationCallback annotationCallback)
setAnnotationCallback in interface DocumentViewControllerannotationCallback - annotation callback associated with this document
view.public AnnotationCallback getAnnotationCallback()
getAnnotationCallback in interface DocumentViewControllerpublic DocumentView getDocumentView()
public void setViewKeyListener(KeyListener l)
setViewKeyListener in interface DocumentViewControllerpublic void setDestinationTarget(Destination destination)
setDestinationTarget in interface DocumentViewControllerpublic void dispose()
dispose in interface DocumentViewControllerpublic Container getViewContainer()
getViewContainer in interface DocumentViewControllerpublic Controller getParentController()
getParentController in interface DocumentViewControllerpublic int getViewMode()
getViewMode in interface DocumentViewControllerpublic void setViewType(int documentViewType)
setViewType in interface DocumentViewControllerdocumentViewType - public boolean setFitMode(int fitMode)
setFitMode in interface DocumentViewControllerpublic int getFitMode()
getFitMode in interface DocumentViewController
public void setDocumentViewType(int documentView,
int fitMode)
setDocumentViewType in interface DocumentViewControllerpublic boolean setCurrentPageIndex(int pageIndex)
setCurrentPageIndex in interface DocumentViewControllerpublic int setCurrentPageNext()
setCurrentPageNext in interface DocumentViewControllerpublic int setCurrentPagePrevious()
setCurrentPagePrevious in interface DocumentViewControllerpublic int getCurrentPageIndex()
getCurrentPageIndex in interface DocumentViewControllerpublic int getCurrentPageDisplayValue()
getCurrentPageDisplayValue in interface DocumentViewControllerpublic float[] getZoomLevels()
getZoomLevels in interface DocumentViewControllerpublic void setZoomLevels(float[] zoomLevels)
setZoomLevels in interface DocumentViewControllerpublic boolean setZoom(float viewZoom)
setZoom in interface DocumentViewControllerviewZoom - zoom factor
public boolean setZoomIn()
setZoomIn in interface DocumentViewControllerpublic boolean setZoomOut()
setZoomOut in interface DocumentViewControllerpublic float getZoom()
getZoom in interface DocumentViewControllerpublic float getRotation()
getRotation in interface DocumentViewControllerpublic float setRotateRight()
setRotateRight in interface DocumentViewControllerpublic float setRotateLeft()
setRotateLeft in interface DocumentViewControllerpublic boolean setRotation(float viewRotation)
setRotation in interface DocumentViewControllerpublic boolean setToolMode(int viewToolMode)
setToolMode in interface DocumentViewControllerpublic boolean isToolModeSelected(int viewToolMode)
isToolModeSelected in interface DocumentViewControllerpublic int getToolMode()
getToolMode in interface DocumentViewControllerpublic void setViewCursor(int currsorType)
setViewCursor in interface DocumentViewControllerpublic Cursor getViewCursor(int currsorType)
getViewCursor in interface DocumentViewControllerpublic void requestViewFocusInWindow()
requestViewFocusInWindow in interface DocumentViewControllerpublic boolean setZoomIn(Point p)
setZoomIn in interface DocumentViewControllerp - Recenter the scrollpane herepublic boolean setZoomOut(Point p)
setZoomOut in interface DocumentViewControllerp - Recenter the scrollpane herepublic void componentHidden(ComponentEvent e)
componentHidden in interface ComponentListenerpublic void componentMoved(ComponentEvent e)
componentMoved in interface ComponentListenerpublic void componentResized(ComponentEvent e)
componentResized in interface ComponentListenerpublic void componentShown(ComponentEvent e)
componentShown in interface ComponentListener
public void firePropertyChange(String event,
int oldValue,
int newValue)
public void addPropertyChangeListener(PropertyChangeListener l)
public void removePropertyChangeListener(PropertyChangeListener l)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||