# Interface: com.pnfsoftware.jeb.client.api.IUnitTextFragment

A text fragment representing a textual document generated by a [unit](IUnit).

## Method: getCaretCoordinates
- return type: `com.pnfsoftware.jeb.core.output.text.ICoordinates`

Description: Retrieve the caret position.
return: 

## Method: getDocument
- return type: `com.pnfsoftware.jeb.core.output.IGenericDocument`

Description: Retrieve the underlying source document used to render fragment, if there is one.
return: a document, or null

## Method: getDocumentObjectsAtCaret
- return type: `java.util.List<java.lang.Object>`

Description: Retrieve the lit of unit specific objects related to the current caret position or currently active item in the fragment. The objects and their type are document\-\(and therefore, unit\-\) specific.
return: 

## Method: getSelectedText
- return type: `java.lang.String`

Description: Retrieve the selected text string.
return: 

## Method: setCaretCoordinates
- parameter: `coord`, type: `com.pnfsoftware.jeb.core.output.text.ICoordinates`
- parameter: `record`, type: `boolean`

Description: Set the caret position.
parameter: coord: 
parameter: record: 

