Foxit PDF SDK
com.foxit.sdk.pdf.TabOrderMgr Class Reference
Inheritance diagram for com.foxit.sdk.pdf.TabOrderMgr:
com.foxit.sdk.common.Base

Public Member Functions

 TabOrderMgr (PDFPage page)
 Constructor, from a PDF page object.
More...
 
 TabOrderMgr (TabOrderMgr other)
 Constructor, with another tab order manager object.
More...
 
boolean adjustStructureOrder (AnnotArray annot_array) throws com.foxit.sdk.PDFException
 Adjust the structure order with specified annotations, and tab order type will be set to com.foxit.sdk.pdf.TabOrderMgr.e_Structure at the same time.
More...
 
Annot getFirstAnnot () throws com.foxit.sdk.PDFException
 Get the first annotation in current tab order.
More...
 
Annot getLastAnnot () throws com.foxit.sdk.PDFException
 Get the last annotation in current tab order.
More...
 
Annot getNextAnnot (Annot annot) throws com.foxit.sdk.PDFException
 Get the next annotation of specified annotation in current tab order.
More...
 
int getOrderType () throws com.foxit.sdk.PDFException
 Get the tab order type.
More...
 
Annot getPrevAnnot (Annot annot) throws com.foxit.sdk.PDFException
 Get the previous annotation of specified annotation in current tab order.
More...
 
boolean isEmpty ()
 Check whether current object is empty or not.
More...
 
void reload () throws com.foxit.sdk.PDFException
 Reload the tab order of annotations.
More...
 
void setOrderType (int order_type) throws com.foxit.sdk.PDFException
 Set the tab order type.
More...
 

Static Public Attributes

static final int e_Column = 0x0002
 C (column order): Annotations are visited in columns running vertically up and down the page.

 
static final int e_None = 0x0000
 None (index order): Annotations are visited in annotation's index across the page.

 
static final int e_Row = 0x0001
 R (row order): Annotations are visited in rows running horizontally across the page.

 
static final int e_Structure = 0x0003
 S (structure order): Annotations are visited in the order in which they appear in the structure tree.

 

Detailed Description

Tab order is the order to navigate through annotations on a PDF page by using Tab key in keyboard. This class offers functions to manage the order of moving the keyboard focus among annotations on a PDF page. Tab order manager will ignore following types of annotations:
note annotations which are as reply annotations, note annotations which are as state annotations, pop-up annotations, annotations whose flags contain com.foxit.sdk.pdf.annots.Annot.e_FlagHidden .
This class offers functions to get the order type and get annotations one by one in the order type. This class also offers functions to change the order type:

After TabOrderMgr.setOrderType being used or calling function TabOrderMgr.adjustStructureOrder , function TabOrderMgr.reload should be called; otherwise the annotations' order may not be changed as expected.

See also
PDFPage
com.foxit.sdk.pdf.annots.Annot

Constructor & Destructor Documentation

◆ TabOrderMgr() [1/2]

com.foxit.sdk.pdf.TabOrderMgr.TabOrderMgr ( PDFPage  page)

Constructor, from a PDF page object.

Parameters
[in]pageA valid PDF page.

◆ TabOrderMgr() [2/2]

com.foxit.sdk.pdf.TabOrderMgr.TabOrderMgr ( TabOrderMgr  other)

Constructor, with another tab order manager object.

Parameters
[in]otherAnother tab order manager object.

Member Function Documentation

◆ adjustStructureOrder()

boolean com.foxit.sdk.pdf.TabOrderMgr.adjustStructureOrder ( AnnotArray  annot_array) throws com.foxit.sdk.PDFException

Adjust the structure order with specified annotations, and tab order type will be set to com.foxit.sdk.pdf.TabOrderMgr.e_Structure at the same time.

This function is used to adjust the annotation order for structure tab order. First, re-order annotations in the input array according to the order in this array, and then re-order the reset annotations (which are not included in the input array) by the reading direction of PDF document.
After this function succeeds, indexes of all annotations in the related PDF page will be changed.

Parameters
[in]annot_arrayAn array of annotations which will be re-ordered first for structure tab order. All the annotations in this array should belong to the same page as the one related to current tab order manager. These annotations should all be valid and should be different from each other.
Returns
true means success, while false means failure.

◆ getFirstAnnot()

Annot com.foxit.sdk.pdf.TabOrderMgr.getFirstAnnot ( ) throws com.foxit.sdk.PDFException

Get the first annotation in current tab order.

Returns
The first annotation. If the return value of function annots.Annot.isEmpty for the returned annotation object is true, that means there is no annotation.

◆ getLastAnnot()

Annot com.foxit.sdk.pdf.TabOrderMgr.getLastAnnot ( ) throws com.foxit.sdk.PDFException

Get the last annotation in current tab order.

Returns
The last annotation. If the return value of function annots.Annot.isEmpty for the returned annotation object is true, that means there is no annotation.

◆ getNextAnnot()

Annot com.foxit.sdk.pdf.TabOrderMgr.getNextAnnot ( Annot  annot) throws com.foxit.sdk.PDFException

Get the next annotation of specified annotation in current tab order.

Parameters
[in]annotThe valid specified annotation.
Returns
The next annotation. If the return value of function annots.Annot.isEmpty for the returned annotation object is true, that means the specified annotation is the last annotation in current tab order.

◆ getOrderType()

int com.foxit.sdk.pdf.TabOrderMgr.getOrderType ( ) throws com.foxit.sdk.PDFException

Get the tab order type.

Returns
The tab order type. Please refer to values starting from com.foxit.sdk.pdf.TabOrderMgr.e_None and this would be one of these values.

◆ getPrevAnnot()

Annot com.foxit.sdk.pdf.TabOrderMgr.getPrevAnnot ( Annot  annot) throws com.foxit.sdk.PDFException

Get the previous annotation of specified annotation in current tab order.

Parameters
[in]annotThe valid specified annotation.
Returns
The previous annotation. If the return value of function annots.Annot.isEmpty for the returned annotation object is true, that means the specified annotation is the first annotation in current tab order.

◆ isEmpty()

boolean com.foxit.sdk.pdf.TabOrderMgr.isEmpty ( )

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

◆ reload()

void com.foxit.sdk.pdf.TabOrderMgr.reload ( ) throws com.foxit.sdk.PDFException

Reload the tab order of annotations.

This function should be called when:


Returns
None.

◆ setOrderType()

void com.foxit.sdk.pdf.TabOrderMgr.setOrderType ( int  order_type) throws com.foxit.sdk.PDFException

Set the tab order type.

Parameters
[in]order_typeThe new tab order type. It should be one of following values:
Returns
None.