Interface ITextItem
- All Superinterfaces:
IItem
- All Known Subinterfaces:
IActionableTextItem
,IVisualTextItem
- All Known Implementing Classes:
AssemblyItem
,TextItem
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 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:
-