findNthElement (RichTextNavigator - Java)

Moves the current position to the element at a specified position within elements of the same type.

Defined in

RichTextNavigator

Syntax

public boolean findNthElement(int type)
    throws NotesException
public boolean findNthElement(int type, int occurrence)
    throws NotesException

Parameters

int type
  • RichTextItem.RTELEM_TYPE_DOCLINK
  • RichTextItem.RTELEM_TYPE_FILEATTACHMENT
  • RichTextItem.RTELEM_TYPE_OLE
  • RichTextItem.RTELEM_TYPE_SECTION
  • RichTextItem.RTELEM_TYPE_TABLE
  • RichTextItem.RTELEM_TYPE_TABLECELL
  • RichTextItem.RTELEM_TYPE_TEXTPARAGRAPH
  • RichTextItem.RTELEM_TYPE_TEXTRUN
int occurrence

The position of the element within elements of the same type in the rich text item. Must be a positive integer. Defaults to 1.

Return value

boolean
  • true if the element exists and the current pointer is reset
  • false if the element does not exist and the current pointer is not reset

Usage

This method returns false if the specified position does not exist.

You can use this method as a basis for future navigation, for example, with findNextElement if the occurrence is explicitly specified.