JAVA Tech VERSION 3.0 manual GetFlip, SetScalescale, GetScale, GetStates

Page 41

Method:

Method:

getFlip()

E.g. var angle = ViewONE.getFlip();

Returns the flip mode as an integer.

setScale(scale)

E.g. ViewONE.setScale(0);

Specifies the scale mode used to display a page. Acceptable integer values are:

0:best fit

The page is scaled to fit into the window area so that the entire page is visible.

1:Fit-to-window-width

The page is scaled so that the width of the page matches the width of the window area. This may result in the visible page height exceeding the available window height in which case a vertical scroll bar appears automatically.

2:Fit-to-window-height

Method:

Method:

The page is scaled so that the height of the page matches the height of the window area. This may result in the visible page width exceeding the available window width in which case a horizontal scroll bar appears

getScale()

E.g. var scale = ViewONE.getScale();

Returns the integer scale value.

getStates()

E.g. states = ViewONE.getStates();

Returns a coded string to be used with setStates(). When this method is called while a document it open, it returns a string containing information about the current zoom, scroll and other states.

41

Image 41
Contents ViewONE JavaScript API Manual Contents Specifying an Annotations File Viewing Toolbars and Buttons Timeout/User Idle Control Introduction Applet user interface ViewONE Standard Installing ViewONEApple Macintosh users JavaScript ViewONE ProMayscript parameter Apple Macintosh users Html Using ViewONE Standard on IE for Apple MacintoshSetting up Windows 2003 server Page Page ViewONE JavaScript Overview JavaScript Reference Method isReady General Applet ControlMethod getVersion OpenFilefilename, Opening documents and imagesCloseDocument ViewONE.closeDocument Closes an open documentPage Method Group Method openListlistFile, OpenDocindex ReloadListNextDoc PrevDoc FirstDoc LastDoc GetDocIndex GetNumDocs MethodgetNumPagesMethod getPage MethodsetPagepageMethod nextPage Method previousPageMethod getCacheFile MethodgetDocReferenceMethodsetAnnotationFilefilename Specifying an Annotations FileSavefilename Saving documents and imagesSavePagefilename MethodsaveSelectedfilenameMethodisMultipageTif ClearHyperlink Document hyperlinksSetHyperlinkurl, dblClick Method Pro-Only Method Pro-Only Method Cold Viewing Options Pro-Only SetBackgroundImagefilename, pageNumber IsBackgroundImageEnabled SetBackgroundImageEnabledtrue/falseSetIndexListFileURL Document Indexes Pro-OnlyInvert ImageSetInvertedtrue/false IsInvertedSetEnhanceModemode IsEnhancetrue/falseGetEnhanceMode SetRotationangleMethod setRotationArrayint angle, int Method initializeRotationArrayint sizeMethod applyRotationArray Method getRotationMethod rotateCounterclockwise MethodrotateClockwiseRotate180 SetFlipmodeSetScalescale GetFlipGetScale GetStatesMethod setStatesstring states ViewONE.zoom100 Zooms image to 100% full resolutionMethod zoomOut Method zoom100Method setZoomAndXYScrollzoom, x, y Method setZoomzoomMethod zoomAreax, y, width, height, highlight, seconds SetXYScrollx, yMethod isDraggingEnabled Method setDraggingEnabledtrue/falseMethod resetBrightness Method setBrightnesspercentMethod getBrightness Method resetContrastMethod setContrastpercent Method getContrastMethod setLuminancepercent Method resetLuminanceMethod getLuminance Method getImageWidthGetImageHeight Method getXResolutionMethod getYResolution GetView ViewingSetViewview IsAreaZoom SetAreaZoomtrue/falseToggleAreaZoom Method setMagnifiertrue/falseMethod setMagnifierInternaltrue/false ToggleMagnifier IsMagnifierSetMagFactor Method getMagFactorShowImageForeColorDialog IsNewWindowVisibleSetImageForeColorcolor ShowImageBackColorDialog SetImageBackColorcolorLabels Method selectPageint pageNumber Selection and clipboardMethod clearSelections Method copyPageToClipboardPrintPage PrintingPrintDocument PrintRangePrintVisible PrintSelectedPrintTransformed SetPrintDialogtrue/falseMethod setPrinterstring Method isPrintDialogMethod setPrintCopiesinteger Or some other informational text Method setPrintHeaderheaderStringMethod setPrintAutoRotate true/false Method setScrollbarstrue/false Toolbars and ButtonsIsScrollbars SetStatusBartrue/falseMethod isFileButtons Method setFileButtonstrue/falseSetPrintButtonstrue/false Method setImageButtonstrue/falseIsImageButtons SetInvertButtonstrue/false Method isPrintButtonsIsInvertButtons Method setNewWindowButtonstrue/falseSetViewButtonstrue/false IsNewWindowButtonsMethod isViewButtons Method setAllButtonstrue/falseMethod isPageButtons Method isAllButtonsMethodsetPageButtonstrue/false IsAdjustToolVisible ToggleAdjustToolSetAdjustToolVisibleOnOff SetFileMenustrue/false Menus and keysIsFileMenus ViewONE.setFileMenustrueViewONE.setViewMenustrue SetViewMenustrue/falseIsViewMenus ViewONE.setImageMenustrue SetImageMenustrue/falseIsImageMenus ViewONE.setPrintMenustrue SetPrintMenustrue/falseIsPrintMenus ViewONE.setPageMenustrue SetPageMenustrue/falseIsPageMenus ViewONE.setSelectMenustrue SetSelectMenustrue/falseIsSelectMenus ViewONE.setPreferenceMenustrue SetPreferenceMenustrue/falseIsPreferenceMenus IsAllMenus SetAllMenustrue/falseSetFileKeystrue/false IsFileKeysIsImageKeys SetImageKeystrue/falseSetViewKeystrue/false SetPrintKeystrue/falseIsPrintKeys SetPageKeystrue/false IsViewKeysIsPageKeys SetSelectKeystrue/falseMethod isAllKeys Method isSelectKeysMethod setAllKeystrue/false Method setTimeoutseconds Timeout/User Idle ControlMethod getTimeout Method stopTimeoutMethod getTimeLeft Event Handler and Event Handling Events handler change in ViewONE Version DocN Html tag is used see Html manual End tab Events ids and descriptionsReady First time the page is viewed HSPACE=0 VSPACE=0 Event Handler exampleMayScript tag Testing your Event Handler