JAVA Tech VERSION 3.0 manual Labels

Page 54

Method Group:

Labels

initializeLabels(numLabels)

setLabel(pageLabel, pageLabelColor, thumbLabel, thumbLabelColor, labelNum)

useLabels()

clearLabels()

E.g.

ViewONE.initializeLabels(3);

ViewONE.setLabel(“Page label 1”, null, “thumb 1”, null, 0);

ViewONE.setLabel(“Page label 2”, null, “thumb 2”, null, 1);

ViewONE.setLabel(“Page label 3”, “223,223,255”, “thumb 3”, “255,223,223”, 2);

ViewONE.useLabels();

ViewONE.openFile(“mydocument.tif”, 1);

This method group specifies the number files (labels) in a list, then specifies each label. Each one representing a successive page of the document and specifying the label to be displayed for the full-page area and the corresponding thumbnail. It then sets the labels in use by calling the useLabels() method.

Label colors are specified using the standard RGB values and where no color is specified (i.e. null) then the default color is white.

Notes:

The label array begins at array element zero.

Labels will remain visible until the document is closed or the clearLabels() method is called.

If you do not want to define a label for either the full-page area or a thumbnail then specify the label as a null string e.g…

ViewONE.setLabel(null, null, “thumb 1”, null, 0);

This example sets up a label for the thumbnail for the first page.

54

Image 54
Contents ViewONE JavaScript API Manual Contents Specifying an Annotations File Viewing Toolbars and Buttons Timeout/User Idle Control Introduction Applet user interface Installing ViewONE ViewONE StandardViewONE Pro Mayscript parameterApple Macintosh users JavaScript Using ViewONE Standard on IE for Apple Macintosh Apple Macintosh users HtmlSetting up Windows 2003 server Page Page ViewONE JavaScript Overview JavaScript Reference General Applet Control Method isReadyMethod getVersion CloseDocument Opening documents and imagesOpenFilefilename, ViewONE.closeDocument Closes an open documentPage Method Group Method openListlistFile, NextDoc PrevDoc FirstDoc LastDoc GetDocIndex GetNumDocs ReloadListOpenDocindex MethodgetNumPagesMethod nextPage MethodsetPagepageMethod getPage Method previousPageMethodgetDocReference Method getCacheFileSpecifying an Annotations File MethodsetAnnotationFilefilenameSavePagefilename Saving documents and imagesSavefilename MethodsaveSelectedfilenameMethodisMultipageTif Document hyperlinks SetHyperlinkurl, dblClickClearHyperlink Method Pro-Only Method Pro-Only Method Cold Viewing Options Pro-Only SetBackgroundImagefilename, pageNumber SetBackgroundImageEnabledtrue/false IsBackgroundImageEnabledDocument Indexes Pro-Only SetIndexListFileURLSetInvertedtrue/false ImageInvert IsInvertedGetEnhanceMode IsEnhancetrue/falseSetEnhanceModemode SetRotationangleMethod applyRotationArray Method initializeRotationArrayint sizeMethod setRotationArrayint angle, int Method getRotationRotate180 MethodrotateClockwiseMethod rotateCounterclockwise SetFlipmodeGetScale GetFlipSetScalescale GetStatesMethod zoomOut ViewONE.zoom100 Zooms image to 100% full resolutionMethod setStatesstring states Method zoom100Method zoomAreax, y, width, height, highlight, seconds Method setZoomzoomMethod setZoomAndXYScrollzoom, x, y SetXYScrollx, yMethod resetBrightness Method setDraggingEnabledtrue/falseMethod isDraggingEnabled Method setBrightnesspercentMethod setContrastpercent Method resetContrastMethod getBrightness Method getContrastMethod getLuminance Method resetLuminanceMethod setLuminancepercent Method getImageWidthMethod getXResolution Method getYResolutionGetImageHeight Viewing SetViewviewGetView ToggleAreaZoom SetAreaZoomtrue/falseIsAreaZoom Method setMagnifiertrue/falseMethod setMagnifierInternaltrue/false SetMagFactor IsMagnifierToggleMagnifier Method getMagFactorIsNewWindowVisible SetImageForeColorcolorShowImageForeColorDialog SetImageBackColorcolor ShowImageBackColorDialogLabels Method clearSelections Selection and clipboardMethod selectPageint pageNumber Method copyPageToClipboardPrintDocument PrintingPrintPage PrintRangePrintTransformed PrintSelectedPrintVisible SetPrintDialogtrue/falseMethod isPrintDialog Method setPrintCopiesintegerMethod setPrinterstring Method setPrintHeaderheaderString Or some other informational textMethod setPrintAutoRotate true/false IsScrollbars Toolbars and ButtonsMethod setScrollbarstrue/false SetStatusBartrue/falseMethod setFileButtonstrue/false Method isFileButtonsMethod setImageButtonstrue/false IsImageButtonsSetPrintButtonstrue/false IsInvertButtons Method isPrintButtonsSetInvertButtonstrue/false Method setNewWindowButtonstrue/falseMethod isViewButtons IsNewWindowButtonsSetViewButtonstrue/false Method setAllButtonstrue/falseMethod isAllButtons MethodsetPageButtonstrue/falseMethod isPageButtons ToggleAdjustTool SetAdjustToolVisibleOnOffIsAdjustToolVisible IsFileMenus Menus and keysSetFileMenustrue/false ViewONE.setFileMenustrueSetViewMenustrue/false IsViewMenusViewONE.setViewMenustrue SetImageMenustrue/false IsImageMenusViewONE.setImageMenustrue SetPrintMenustrue/false IsPrintMenusViewONE.setPrintMenustrue SetPageMenustrue/false IsPageMenusViewONE.setPageMenustrue SetSelectMenustrue/false IsSelectMenusViewONE.setSelectMenustrue SetPreferenceMenustrue/false IsPreferenceMenusViewONE.setPreferenceMenustrue SetFileKeystrue/false SetAllMenustrue/falseIsAllMenus IsFileKeysSetImageKeystrue/false IsImageKeysSetPrintKeystrue/false IsPrintKeysSetViewKeystrue/false IsPageKeys IsViewKeysSetPageKeystrue/false SetSelectKeystrue/falseMethod isSelectKeys Method setAllKeystrue/falseMethod isAllKeys Method getTimeout Timeout/User Idle ControlMethod setTimeoutseconds Method stopTimeoutMethod getTimeLeft Event Handler and Event Handling Events handler change in ViewONE Version Events ids and descriptions DocN Html tag is used see Html manual End tabReady First time the page is viewed Event Handler example HSPACE=0 VSPACE=0Testing your Event Handler MayScript tag