-
- All Superinterfaces:
AdjustmentListener,EventListener,FocusListener
- All Known Implementing Classes:
AbstractDocumentView,CollectionDocumentView,FullScreenDocumentView,OneColumnPageView,OnePageView,TwoColumnPageView,TwoPageView
public interface DocumentView extends AdjustmentListener, FocusListener
The DocumentView interface should be used when create a new multipage view.
- Since:
- 2.5
- See Also:
AbstractDocumentView
-
-
Field Summary
Fields Modifier and Type Field Description static intLEFT_VIEWIndicates that a two column view will have odd-numbered pages on the left.static intRIGHT_VIEWIndicates that a two column view will have odd-numbered pages on the right.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Componentadd(Component comp)Componentadd(Component comp, int index)voiddispose()Dispose all resources associated with this views.DimensiongetDocumentSize()Gets the total size of the document view.intgetNextPageIncrement()Get the next page index.DocumentViewControllergetParentViewController()Parent document view controllerintgetPreviousPageIncrement()Get the previous page index.DocumentViewModelgetViewModel()Gets the view model associated with this document view.voidinstallCurrentTool(ToolHandler currentTool)Installs the current tool handler.voidremove(Component comp)voidrepaint()Component repaint call.voidsetToolMode(int viewToolMode)Sets the tool type/mode that is to be enabled for the particular view.ToolHandleruninstallCurrentTool()Uninstalls the current tool Handler.voidupdateDocumentView()Update the child components which make up this view.-
Methods inherited from interface java.awt.event.AdjustmentListener
adjustmentValueChanged
-
Methods inherited from interface java.awt.event.FocusListener
focusGained, focusLost
-
-
-
-
Field Detail
-
LEFT_VIEW
static final int LEFT_VIEW
Indicates that a two column view will have odd-numbered pages on the left.- See Also:
- Constant Field Values
-
RIGHT_VIEW
static final int RIGHT_VIEW
Indicates that a two column view will have odd-numbered pages on the right.- See Also:
- Constant Field Values
-
-
Method Detail
-
getNextPageIncrement
int getNextPageIncrement()
Get the next page index. This will number will very depending on the page view type. Two column page views usually increment page counts by 2 and single page views by 1 page.- Returns:
- number of pages to increment page count on a page increment command.
-
getPreviousPageIncrement
int getPreviousPageIncrement()
Get the previous page index. This will number will very depending on the page view type. Two column page views usually increment page counts by 2 and single page views by 1 page.- Returns:
- number of pages to increment page count on a page increment command.
-
getDocumentSize
Dimension getDocumentSize()
Gets the total size of the document view. This size will very depending on the view type. The size dimension has been normalized to a zoom factor of 1.0f and rotation is taken care off.- Returns:
- size of document in pixels for all pages represented in the view.
-
getParentViewController
DocumentViewController getParentViewController()
Parent document view controller- Returns:
- document view controller
-
getViewModel
DocumentViewModel getViewModel()
Gets the view model associated with this document view.- Returns:
- document view model used by this view.
-
dispose
void dispose()
Dispose all resources associated with this views.
-
updateDocumentView
void updateDocumentView()
Update the child components which make up this view.
-
setToolMode
void setToolMode(int viewToolMode)
Sets the tool type/mode that is to be enabled for the particular view. Mouse and keyboard listeners are associated with this call. No actual state is stored in the view this is only for setup purposes. The tool state is stored in the DocumentViewModel.- Parameters:
viewToolMode- tool mode type.
-
uninstallCurrentTool
ToolHandler uninstallCurrentTool()
Uninstalls the current tool Handler.- Returns:
- tool handler that was removed.
-
installCurrentTool
void installCurrentTool(ToolHandler currentTool)
Installs the current tool handler.- Parameters:
currentTool- tool ot install.
-
repaint
void repaint()
Component repaint call.
-
remove
void remove(Component comp)
-
-