Interface ITextItem

All Superinterfaces:
IItem
All Known Subinterfaces:
IActionableTextItem, IVisualTextItem
All Known Implementing Classes:
AssemblyItem, TextItem

public interface ITextItem extends IItem
A text item is used to identify a particular sequence of characters within the string of an ITextDocumentPart. This interface is not directly useful. Derived interfaces IVisualTextItem and IActionableTextItem are used to associate class IDs (eg, for coloring) and item IDs (eg, to make items actionable) to text items.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get item length within a line.
    Get the line that contains this item.
    int
    Get the item offset within a line.
    int
    Get the item end offset (exclusive) within a line.
    Get the text of the item.
  • Method Details

    • getOffset

      int getOffset()
      Get the item offset within a line.
      Returns:
      the item offset
    • getLength

      int getLength()
      Get item length within a line.
      Returns:
      the item character count
    • getOffsetEnd

      int getOffsetEnd()
      Get the item end offset (exclusive) within a line.
      Returns:
    • getLine

      ILine getLine()
      Get the line that contains this item.
      Returns:
      the line, or null if the item does not belong to any line
    • getText

      String getText()
      Get the text of the item.
      Returns: