|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.icesoft.pdf.ri.common.views.AbstractDocumentViewModel
The AbstractDocumentViewModel is responsible for keeping the state of the documetn view. The AbstractDocumentViewModel also stores an list of PageViewComponetnts who's state is update as the model changes. The AbstractDocumentViewModel can be swapped into different page views quickly and efficently.
DocumentViewModelImpl| Field Summary | |
protected Document |
currentDocument
|
protected int |
currentPageIndex
|
protected static int |
MAX_PAGE_SIZE_READ_AHEAD
|
protected static int |
maxPageInitThreads
|
protected static int |
maxPainterThreads
|
protected int |
oldPageIndex
|
protected float |
oldUserRotation
|
protected int |
oldUserToolModeFlag
|
protected float |
oldUserZoom
|
protected Vector |
pageComponents
|
protected static PooledExecutor |
pageInitilizationThreadPool
|
protected static PooledExecutor |
pagePainterThreadPool
|
protected float |
userRotation
|
protected int |
userToolModeFlag
|
protected float |
userZoom
|
| Fields inherited from interface com.icesoft.pdf.views.DocumentViewModel |
DISPLAY_TOOL_NONE, DISPLAY_TOOL_PAN, DISPLAY_TOOL_WAIT, DISPLAY_TOOL_ZOOM_IN, DISPLAY_TOOL_ZOOM_OUT |
| Constructor Summary | |
AbstractDocumentViewModel(Document currentDocument)
|
|
| Method Summary | |
void |
dispose()
Free resources associated with this model. |
void |
executePageInitialization(Runnable runnable)
|
void |
executePagePainter(Runnable runnable)
|
Document |
getDocument()
Gets the PDF document object associated with this views. |
Rectangle |
getPageBounds(int pageIndex)
Gets the page bound of the specified page Index. |
Vector |
getPageComponents()
Gets the page components associated with this view model. |
int |
getViewCurrentPageIndex()
Gets the current page index represented in this model. |
float |
getViewRotation()
Returns the zoom factor of the page visualization. |
int |
getViewToolMode()
Gets the tool mode. |
float |
getViewZoom()
Gets the view model zoom level. |
boolean |
isViewToolModeSelected(int viewToolMode)
Checks if the specified tool mode is set in the view model. |
boolean |
setViewCurrentPageIndex(int pageIndex)
Sets the view model current page index. |
boolean |
setViewRotation(float viewRotation)
Sets the view rotaiton of this model. |
boolean |
setViewToolMode(int viewToolMode)
Sets the view tool mode. |
boolean |
setViewZoom(float viewZoom)
Sets the zoom factor of the page visualization. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Document currentDocument
protected Vector pageComponents
protected float userZoom
protected float oldUserZoom
protected float userRotation
protected float oldUserRotation
protected int currentPageIndex
protected int oldPageIndex
protected int userToolModeFlag
protected int oldUserToolModeFlag
protected static PooledExecutor pageInitilizationThreadPool
protected static PooledExecutor pagePainterThreadPool
protected static final int MAX_PAGE_SIZE_READ_AHEAD
protected static int maxPainterThreads
protected static int maxPageInitThreads
| Constructor Detail |
public AbstractDocumentViewModel(Document currentDocument)
| Method Detail |
public Document getDocument()
DocumentViewModel
getDocument in interface DocumentViewModel
public void executePageInitialization(Runnable runnable)
throws InterruptedException
executePageInitialization in interface DocumentViewModelInterruptedException
public void executePagePainter(Runnable runnable)
throws InterruptedException
executePagePainter in interface DocumentViewModelInterruptedExceptionpublic Vector getPageComponents()
DocumentViewModel
getPageComponents in interface DocumentViewModelpublic boolean setViewCurrentPageIndex(int pageIndex)
DocumentViewModel
setViewCurrentPageIndex in interface DocumentViewModelpageIndex - zero based current pages page index of the document.
public int getViewCurrentPageIndex()
DocumentViewModel
getViewCurrentPageIndex in interface DocumentViewModelpublic boolean setViewZoom(float viewZoom)
setViewZoom in interface DocumentViewModelviewZoom - zoom factor
public float getViewZoom()
DocumentViewModel
getViewZoom in interface DocumentViewModelpublic boolean setViewRotation(float viewRotation)
DocumentViewModel
setViewRotation in interface DocumentViewModelviewRotation -
public float getViewRotation()
getViewRotation in interface DocumentViewModelpublic boolean setViewToolMode(int viewToolMode)
DocumentViewModel
setViewToolMode in interface DocumentViewModelviewToolMode -
public int getViewToolMode()
DocumentViewModel
getViewToolMode in interface DocumentViewModelpublic boolean isViewToolModeSelected(int viewToolMode)
DocumentViewModel
isViewToolModeSelected in interface DocumentViewModelviewToolMode - tool model to check if selected.
public Rectangle getPageBounds(int pageIndex)
DocumentViewModel
getPageBounds in interface DocumentViewModelpageIndex - zero based page index.
public void dispose()
DocumentViewModel
dispose in interface DocumentViewModel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||