Package com.pnfsoftware.jeb.client.api
Interface IUnitTextFragment
- All Superinterfaces:
IUnitFragment
A text fragment representing a textual document generated by a
unit.-
Method Summary
Modifier and TypeMethodDescriptionRetrieve the caret position.Retrieve the underlying source document used to render this fragment, if there is one.Retrieve the list of unit-specific objects related to the current caret position or currently active item in the fragment.Retrieve the selected text string.voidsetCaretCoordinates(ICoordinates coord, boolean record) Set the caret position.Methods inherited from interface com.pnfsoftware.jeb.client.api.IUnitFragment
getActiveAddress, getActiveAddress, getActiveItem, getActiveItemAsText, getUnit, isActiveItem, setActiveAddress
-
Method Details
-
getDocument
IGenericDocument getDocument()Retrieve the underlying source document used to render this fragment, if there is one.- Returns:
- a document, or null
-
getSelectedText
String getSelectedText()Retrieve the selected text string.- Returns:
- the selected text, or null if there is no text selection
-
getCaretCoordinates
ICoordinates getCaretCoordinates()Retrieve the caret position.- Returns:
- the caret coordinates, or null if not applicable
-
setCaretCoordinates
Set the caret position.- Parameters:
coord- new caret coordinatesrecord- true to record the move in the navigation history
-
getDocumentObjectsAtCaret
Retrieve the list 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.- Returns:
- a list of related document objects
-