|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ITextPieceContainer
Container for ITextPieceKeepers. As logical unit represents one text node in XSLT-transformed document. Text of that node is rendered(formated into more lines or line segments(first and last can be segments), where each line or line segment keeps one ITextPieceKeeper and is located (drawn) by ITextLocator. Keepers are ordered and indexed as follows text in node they keeps. Only in noticed order can be added to container. Container creates ItextPieceInfo for each added keeper and stores it.
ITextPieceKeeper
,
ITextPieceInfo
Method Summary | |
---|---|
ITextPieceInfo |
add(ITextPieceKeeper pieceKeeper)
Adds ITextPieceKeeper to container. |
List<ITextPieceKeeper> |
getAll()
Returns all stored ITextPieceKeeper. |
ITextPieceInfo |
getInfo(ITextPieceKeeper forPiece)
Returns ITextPieceInfo for ITextPieceKeeper. |
ITextPieceKeeper |
getKeeper(int index)
Returns ITextPieceKeeper stored with index index. |
ITextPieceKeeper |
getKeeperByRenderedOffset(int indexInRenderedText)
Returns keeper holding rendered text where index falls. |
List<ITextPieceKeeper> |
getKeepers(int startIndex,
int endIndex)
Returns ITextPieceKeepers stored with index in closed interval startIndex, endIndex. |
List<ITextPieceKeeper> |
getKeepers(ITextPieceKeeper startKeeper,
ITextPieceKeeper endKeeper)
Returns ITextPieceKeepers stored after startKeeper including and before endKeeper including. |
ITextPieceKeeper |
getNext(ITextPieceKeeper keeper)
Returns next stored ITextPieceKeeper in order they are stored. |
ITextPieceKeeper |
getPrevious(ITextPieceKeeper keeper)
Returns previous stored ITextPieceKeeper in order they are stored. |
String |
getWholeRenderedText()
Returns rendered text of all stored keepers, exactly the same as is rendered. |
boolean |
hasNext(ITextPieceKeeper keeper)
Returns if keeper is last or not. |
boolean |
hasPrevious(ITextPieceKeeper keeper)
Returns if keeper is first or not. |
int |
indexOf(ITextPieceKeeper piece)
Returns index of ITextPieceKeeper piece in this container as is stored. |
int |
resolveOriginalIndex(int indexInOriginalText,
XMLAccess xmlAccess)
Resolves index in DOM node's text of original document(not XSLT-transformed) to index in node's rendered text. |
int |
resolveRenderedIndex(int indexInRenderedText,
XMLAccess xmlAccess)
Resolves index in container rendered text to DOM node's text of original document(not XSLT-transformed). |
int |
size()
Returns number of all stored pieces. |
Method Detail |
---|
ITextPieceKeeper getKeeper(int index)
index
- of wanted keeper
List<ITextPieceKeeper> getKeepers(int startIndex, int endIndex)
startIndex
- of first wanted keeperendIndex
- of last wanted keeper
List<ITextPieceKeeper> getKeepers(ITextPieceKeeper startKeeper, ITextPieceKeeper endKeeper)
startKeeper
- first wanted keeperendKeeper
- last wanted keeper
ITextPieceInfo add(ITextPieceKeeper pieceKeeper)
pieceKeeper
- keeper to add
int size()
ITextPieceInfo getInfo(ITextPieceKeeper forPiece)
forPiece
- ITextPieceKeeper stored in this container
List<ITextPieceKeeper> getAll()
ITextPieceKeeper getNext(ITextPieceKeeper keeper)
keeper
- asked for successor
piece
is the last partboolean hasNext(ITextPieceKeeper keeper)
keeper
- asked for successor
ITextPieceKeeper getPrevious(ITextPieceKeeper keeper)
keeper
- asked for predeccessor
piece
is the first partboolean hasPrevious(ITextPieceKeeper keeper)
keeper
- asked for predeccessor
int indexOf(ITextPieceKeeper piece)
piece
- asked for index
int resolveOriginalIndex(int indexInOriginalText, XMLAccess xmlAccess)
indexInOriginalText
- index in DOM node's original text or one behind
int resolveRenderedIndex(int indexInRenderedText, XMLAccess xmlAccess)
indexInRenderedText
- index in rendered text of container (node) (0 to
text.length-1)or index one behind the text(for example
when index is character gap index, can be text lenght)
ITextPieceKeeper getKeeperByRenderedOffset(int indexInRenderedText)
indexInRenderedText
- index in whole rendered text or one behind
String getWholeRenderedText()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |