com.qoppa.pdf.annotations
Interface IAnnotationManager


public interface IAnnotationManager

This interface manages the selection cycle for AnnotationComponents. AnnotationComponents can be programmatically selected and deselected with selectAnnotationComponent(AnnotationComponent) and deselectAnnotationComponent(AnnotationComponent).

Listeners can register with this class with addSelectionListener(IAnnotSelectionListener).

An implementation of this class can be obtained from a PDFViewerBean with PDFViewerBean.getAnnotationManager().

Author:
Qoppa Software

Method Summary
 void addComponentToSelection(AnnotationComponent ac)
          Adds an annotation component to the list of selected annotations.
 void addSelectionListener(IAnnotSelectionListener listener)
          Adds a selection listener to the manager.
 void clearSelection()
          Clears the current annotation component selection.
 void deselectAnnotationComponent(AnnotationComponent ac)
          Deselects an annotation.
 Vector getSelectedComponents()
          Returns a list of annotation components that are selected.
 boolean isSelected(AnnotationComponent ac)
          Returns a flag that indicates whether the selection component is selected.
 void selectAnnotationComponent(AnnotationComponent ac)
          Selects an annotation.
 void selectAnnotationComponents(AnnotationComponent[] acs)
          Selects a list of annotations.
 

Method Detail

addComponentToSelection

void addComponentToSelection(AnnotationComponent ac)
Adds an annotation component to the list of selected annotations.

Parameters:
ac - The annotation component to add

addSelectionListener

void addSelectionListener(IAnnotSelectionListener listener)
Adds a selection listener to the manager. Selection listeners will be notified when any annotations are selected or deselected.

Parameters:
listener - The new listener

clearSelection

void clearSelection()
Clears the current annotation component selection. Any annotation components that are selected will be deselected.


deselectAnnotationComponent

void deselectAnnotationComponent(AnnotationComponent ac)
Deselects an annotation.

Parameters:
ac - The annotation to deselect

getSelectedComponents

Vector getSelectedComponents()
Returns a list of annotation components that are selected. The list contains objects that implement AnnotationComponent.

Returns:
a list of selected annotation components

isSelected

boolean isSelected(AnnotationComponent ac)
Returns a flag that indicates whether the selection component is selected.

Parameters:
ac - The annotation component
Returns:
true if selected, false otherwise

selectAnnotationComponent

void selectAnnotationComponent(AnnotationComponent ac)
Selects an annotation.

Parameters:
ac - The annotation to select

selectAnnotationComponents

void selectAnnotationComponents(AnnotationComponent[] acs)
Selects a list of annotations.

Parameters:
acs - The annotations to select