Class Index

Classes


Class CoreControls.AnnotationManager

Represents an object that manages the Annotations that appear on a Document's pages when displayed in a DocumentViewer.

Class Summary
Constructor Attributes Constructor Name and Description
 
Creates a new instance of AnnotationManager.
Method Summary
Method Attributes Method Name and Description
 
AddAnnotation(annotation)
Adds the specified annotation to the managed list of annotations
 
AddLink(link)
Adds the specified link to the page container
 
AddWidget(widget)
Adds the specified widget to the managed list of widgets
 
Checks if the HTML document already contains the div element for the widget
 
Creates the DOM element for a button widget
 
Creates the DOM element for a choice widget
 
Creates the DOM element for a text widget
 
DeleteAnnotation(annotation)
Deletes the specified annotation in the managed list of annotations.
 
Deselects all annotations.
 
DeselectAnnotation(annotation)
Deselects the specified annotation.
 
DrawAnnotations(pageNumber)
Draws all annotations associated with the given page number.
 
DrawWidgets(pageNumber)
Draws all annotations associated with the given page number.
 
FilterAnnotations(filterStr)
Causes annotations to be filtered based on a filter string on author.
 
Gets the list of all annotations managed by the AnnotationManager.
 
Returns the user name of the current user
 
Returns whether the current user has admin privileges
 
Returns whether the viewer currently has annotations toggled off
 
Returns whether the viewer is currently in read-only mode
 
Returns the list of selected annotations.
 
Returns whether the viewer is using a filter on annotations to be displayed
 
HasAnnotation(annotation)
Determines if the specified annotation exists in the managed list of annotations
 
HasWidget(widget)
Determines if the specified widget exists in the managed list of widgets
 
Returns whether an annotation is currently selected
 
LoadAnnotations(xfdfString)
Loads XFDF (XML) annotations into the viewer.
 
RedrawAnnotation(annotation)
Causes the specified annotation to be redrawn.
 
Saves all annotations as XFDF (XML)
 
SelectAnnotation(annotation)
Selects the specified annotation.
 
SelectAnnotations(annotation)
Selects the specified annotations.
 
Sets the function to call after annotations have been added or deleted.
 
Sets the function to call after annotations have been filtered.
 
Sets the function to call after annotation selection has been changed.
 
Sets the function to call after annotations have been toggled on/off.
 
Sets the function to override the default selection box control points drawing on the annotation canvas.
 
sets the current user of the viewer
 
SetIsAdminUser(isAdminUser)
sets whether the current user is an admin user
 
SetMarkupOff(markupOff)
sets whether annotations are toggled off
 
SetReadOnly(readOnly)
sets whether the viewer is currently in read-only mode
 
Sets the function to override the default selection box drawing on the annotation canvas.
 
SetUseFilter(useFilter)
sets whether annotations are to be filtered based on author
 
Sets the CSS attributes for the div element representing a widget annotation
 
Toggles annotations on/off.
 
UpdateAnnotation(annotation)
Updates the specified annotation in the managed list of annotations
Class Detail
CoreControls.AnnotationManager(docViewer)
Creates a new instance of AnnotationManager.
Parameters:
{CoreControls.DocumentViewer} docViewer
Method Detail
AddAnnotation(annotation)
Adds the specified annotation to the managed list of annotations
Parameters:
{Annotations.Annotation} annotation
An instance of Annotation.

AddLink(link)
Adds the specified link to the page container
Parameters:
link
a link object specifying the link's Rect.

AddWidget(widget)
Adds the specified widget to the managed list of widgets
Parameters:
{Annotations.WidgetAnnotation} widget
An instance of WidgetAnnotation.

ContainsDuplicateWidgetDiv(widget, $div)
Checks if the HTML document already contains the div element for the widget
Parameters:
{Annotations.WidgetAnnotation} widget
An instance of WidgetAnnotation.
$div
The new div element representing the widget.

CreateButtonWidget(widget)
Creates the DOM element for a button widget
Parameters:
{Annotations.ButtonWidgetAnnotation} widget
An instance of ButtonWidgetAnnotation.

CreateChoiceWidget(widget)
Creates the DOM element for a choice widget
Parameters:
{Annotations.ChoiceWidgetAnnotation} widget
An instance of ChoiceWidgetAnnotation.

CreateTextWidget(widget)
Creates the DOM element for a text widget
Parameters:
{Annotations.TextWidgetAnnotation} widget
An instance of TextWidgetAnnotation.

DeleteAnnotation(annotation)
Deletes the specified annotation in the managed list of annotations.If an annotation is successfully deleted, the callback AnnotationChangedCallback will be invoked with a "delete" action.
Parameters:
{Annotations.Annotation} annotation
An instance of Annotation.

DeselectAllAnnotations()
Deselects all annotations.If an annotation is successfully deselected, the callback AnnotationSelectedCallback will be invoked with a "deselected" action with a null value as the array of annotations parameter.Note: the AnnotationSelectedCallback expects two parameters: first is an array of annotations, second is a string value of either "selected" or "deselected"

DeselectAnnotation(annotation)
Deselects the specified annotation.If an annotation is successfully deselected, the callback AnnotationSelectedCallback will be invoked with a "deselected" action.Note: the AnnotationSelectedCallback expects two parameters: first is an array of annotations, second is a string value of either "selected" or "deselected"
Parameters:
{Annotations.Annotation} annotation
An instance of Annotation.

DrawAnnotations(pageNumber)
Draws all annotations associated with the given page number.Note that the entire annotation canvas for the page will be redrawn.
Parameters:
{number} pageNumber
The page number for the page to draw.

DrawWidgets(pageNumber)
Draws all annotations associated with the given page number.Note that the entire annotation canvas for the page will be redrawn.
Parameters:
{number} pageNumber
The page number for the page to draw.

FilterAnnotations(filterStr)
Causes annotations to be filtered based on a filter string on author. Only annotations by the specified author will get displayed on the document.Note that filtered annotations are not deleted, they are just not visible.
Parameters:
{string} filterStr
an author name

{Annotations.Annotation[]} GetAnnotationsList()
Gets the list of all annotations managed by the AnnotationManager.
Returns:
{Annotations.Annotation[]} An array of Annotations.

{string} GetCurrentUser()
Returns the user name of the current user
Returns:
{string} the user name of the current user

{boolean} GetIsAdminUser()
Returns whether the current user has admin privileges
Returns:
{boolean} true if the current user is an admin, false otherwise

{boolean} GetMarkupOff()
Returns whether the viewer currently has annotations toggled off
Returns:
{boolean} true if annots are currently toggled off, false otherwise

{boolean} GetReadOnly()
Returns whether the viewer is currently in read-only mode
Returns:
{boolean} true if the current viewer is in read-only mode, false otherwise

{Annotations.Annotation[]} GetSelectedAnnotations()
Returns the list of selected annotations.
Returns:
{Annotations.Annotation[]} An array of selected annotations.

{boolean} GetUseFilter()
Returns whether the viewer is using a filter on annotations to be displayed
Returns:
{boolean} true if annots are currently filtered, false otherwise

HasAnnotation(annotation)
Determines if the specified annotation exists in the managed list of annotations
Parameters:
{Annotations.Annotation} annotation
An instance of Annotation.

HasWidget(widget)
Determines if the specified widget exists in the managed list of widgets
Parameters:
{Annotations.WidgetAnnotation} widget
An instance of WidgetAnnotation.

{boolean} IsAnnotationSelected(annotation)
Returns whether an annotation is currently selected
Parameters:
{Annotations.Annotation} annotation
An instance of Annotation.
Returns:
{boolean} true if annotation is selected, false otherwise

LoadAnnotations(xfdfString)
Loads XFDF (XML) annotations into the viewer.
Parameters:
{string} xfdfString
The XFDF (XML) annotations as a string

RedrawAnnotation(annotation)
Causes the specified annotation to be redrawn. Note that the entire annotation canvas for the page will be redrawn.
Parameters:
{Annotations.Annotation} annotation
The annotation to be redrawn.

{string} SaveAnnotations()
Saves all annotations as XFDF (XML)
Returns:
{string} The XFDF (XML) annotations as a string

SelectAnnotation(annotation)
Selects the specified annotation.If an annotation is successfully selected, the callback AnnotationSelectedCallback will be invoked with a "selected" action.Note: the AnnotationSelectedCallback expects two parameters: first is an array of annotations, second is a string value of either "selected" or "deselected"
Parameters:
{Annotations.Annotation} annotation
An instance of Annotation.

SelectAnnotations(annotation)
Selects the specified annotations.If an annotation is successfully selected, the callback AnnotationSelectedCallback will be invoked with a "selected" action.Note: the AnnotationSelectedCallback expects two parameters: first is an array of annotations, second is a string value of either "selected" or "deselected"
Parameters:
{Annotations.Annotation[]} annotation
An array of Annotations.

SetAnnotationChangedCallback(callback)
Sets the function to call after annotations have been added or deleted.
Parameters:
{function} callback
A function with parameters (annotation, action)

SetAnnotationFilteredCallback(callback)
Sets the function to call after annotations have been filtered.
Parameters:
{function} callback
A function with parameters (annotations)

SetAnnotationSelectedCallback(callback)
Sets the function to call after annotation selection has been changed.
Parameters:
{function} callback
A function with parameters (annotation, action)

SetAnnotationToggledCallback(callback)
Sets the function to call after annotations have been toggled on/off.
Parameters:
{function} callback
A function with parameters (annotations)

SetControlPointDrawCallback(callback)
Sets the function to override the default selection box control points drawing on the annotation canvas.
Parameters:
{function} callback
A function with parameters (annotation, canvas context, x, y, width). The parameters x, y and width represent the dimensions of the selection control point.

SetCurrentUser(user)
sets the current user of the viewer
Parameters:
{string} user
the user name of the current user

SetIsAdminUser(isAdminUser)
sets whether the current user is an admin user
Parameters:
{boolean} isAdminUser
true if the current user is an admin, false otherwise

SetMarkupOff(markupOff)
sets whether annotations are toggled off
Parameters:
{boolean} markupOff
true if the annotations are toggled off, false otherwise

SetReadOnly(readOnly)
sets whether the viewer is currently in read-only mode
Parameters:
{boolean} readOnly
true if the viewer is in read-only mode, false otherwise

SetSelectionBoxDrawCallback(callback)
Sets the function to override the default selection box drawing on the annotation canvas.
Parameters:
{function} callback
A function with parameters (annotation, canvas context, x, y, width, height). The parameters x,y, width and height represent the dimensions of the selection box.

SetUseFilter(useFilter)
sets whether annotations are to be filtered based on author
Parameters:
{boolean} useFilter
true if the annotations are to be filtered, false otherwise

SetWidgetDivCssAttributes(widget, $div)
Sets the CSS attributes for the div element representing a widget annotation
Parameters:
{Annotations.WidgetAnnotation} widget
An instance of WidgetAnnotation.
$div
The div element representing the widget.

ToggleAnnotations()
Toggles annotations on/off.i.e. Show all annotations or hide all annotations.

UpdateAnnotation(annotation)
Updates the specified annotation in the managed list of annotations
Parameters:
{Annotations.Annotation} annotation
An instance of Annotation.

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Feb 13 2013 12:56:31 GMT-0800 (PST)