| java.lang.Object | ||
| ↳ | com.pnfsoftware.jeb.util.events.EventSource | |
| ↳ | com.pnfsoftware.jeb.core.output.text.impl.AbstractTextDocument | |
Known Direct Subclasses
|
A skeleton implementation of a text document. In order to minimize code breakage on API changes,
it is recommended plugins extend this class instead of implements ITextDocument from
scratch.
The first anchor is 0. By default, the addressing scheme mirrors document coordinates:
coordinates: (anchor, line, column) <-> address: "a,y,x"
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| AbstractTextDocument() | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| ICoordinates |
addressToCoordinates(String address)
Convert a unit-specific address to document-specific text coordinates.
| ||||||||||
| String |
coordinatesToAddress(ICoordinates coordinates, AddressConversionPrecision precision)
Convert document-specific text coordinates to a unit-specific address.
| ||||||||||
| final String |
coordinatesToAddress(ICoordinates coordinates)
Convert document-specific text coordinates to a unit-specific address using a default
conversion precision.
| ||||||||||
| void |
dispose()
The default implementation does nothing.
| ||||||||||
| ITextDocumentPart |
getDocumentPart(long anchorId, int linesAfter)
Retrieve a document part.
| ||||||||||
| ITextDocumentPart |
getDocumentPart2(long anchorBegin, long anchorEnd)
The default implementation throws.
| ||||||||||
| long |
getFirstAnchor()
The default implementation returns 0.
| ||||||||||
| long |
getInitialAnchor()
The default implementation returns the first anchor as the initial anchor.
| ||||||||||
| IPropertyManager |
getPropertyManager()
The default implementation returns null.
| ||||||||||
| String | toString() | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pnfsoftware.jeb.util.events.EventSource
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.pnfsoftware.jeb.core.output.IGenericDocument
| |||||||||||
From interface
com.pnfsoftware.jeb.core.output.text.ITextDocument
| |||||||||||
From interface
com.pnfsoftware.jeb.util.events.IEventSource
| |||||||||||
Convert a unit-specific address to document-specific text coordinates. It is recommended to return canonical coordinates. The implementation might return approximate coordinates, ie the closest coordinates (in terms of distance) calculated as part of a best effort approach to minimizing the return of null values.
Note: The addressing scheme is unit specific, and defined by the plugin developer. Addresses should not start with the reserved '@' prefix.
| address | a textual address |
|---|
Convert document-specific text coordinates to a unit-specific address.
Note: The addressing scheme is unit specific, and defined by the plugin developer. Addresses should not start with the reserved '@' prefix.
| coordinates | the coordinates |
|---|---|
| precision | indicate the precision of the address (
COARSE will return a raw address, with a faster
result while FINE will return a more precise
address that can be a bit longer). When COARSE,
it must assure that address is obtained as fast as possible. |
Convert document-specific text coordinates to a unit-specific address using a default conversion precision.
Note: The addressing scheme is unit specific, and defined by the plugin developer. Addresses should not start with the reserved '@' prefix.
| coordinates | the coordinates |
|---|
The default implementation does nothing.
Retrieve a document part. Equivalent to getDocumentPart(anchorId, linesAfter) .
| anchorId | the anchor id |
|---|---|
| linesAfter | number of lines after |
The default implementation throws.
| anchorBegin | start anchor, inclusive |
|---|---|
| anchorEnd | final anchor, exclusive |
| NotImplementedException |
|---|
The default implementation returns 0.
The default implementation returns the first anchor as the initial anchor.
The default implementation returns null.