|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.editor.textEditor.TextPieceContainer
public class TextPieceContainer
Container for ITextPieceKeepers. As logical unit represents one text node. Text of that node is formated into more lines or line segments(first and last can be segments). Each line or line segment keeps one ITextPieceKeeper and is located (or displayed) by ITextLocator. Ordering keepers is like lines of text are ordered in node and only in this ordering keepers can be added.
Constructor Summary | |
---|---|
TextPieceContainer(ITextPieceKeeper firstPieceKeeper,
String id,
String fullText)
Constructor. |
Method Summary | |
---|---|
ITextPieceInfo |
add(ITextPieceKeeper pieceKeeper)
Adds ITextPieceKeeper to container. |
List<ITextPieceKeeper> |
getAll()
Returns all stored ITextPieceKeeper. |
protected String |
getFullText()
|
ITextPieceInfo |
getInfo(ITextPieceKeeper forPiece)
Returns ITextPieceInfo for ITextPieceKeeper. |
ITextPieceKeeper |
getNext(ITextPieceKeeper piece)
Returns next stored ITextPieceKeeper in order they are stored. |
String |
getNodeID()
|
ITextPieceKeeper |
getPiece(int index)
Returns ITextPieceKeeper stored with index index. |
int |
getPieceCount()
Returns number of all stored pieces. |
ITextPieceKeeper |
getPrevious(ITextPieceKeeper piece)
Returns previous stored ITextPieceKeeper in order they are stored. |
String |
getWholeContainerText()
|
int |
indexOf(ITextPieceKeeper piece)
Returns index of ITextPieceKeeper piece in this container as is stored. |
ITextPieceKeeper |
OffsetInPieceKeeper(int offset)
|
void |
setNodeID(String nodeID)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextPieceContainer(ITextPieceKeeper firstPieceKeeper, String id, String fullText)
firstPieceKeeper
- first TextPieceKeeper in this containerid
- id of node corresponding to this TextPieceContainerfullText
- fullText of this containerMethod Detail |
---|
public ITextPieceInfo add(ITextPieceKeeper pieceKeeper)
pieceKeeper
- keeper to add
public ITextPieceKeeper getPiece(int index)
ITextPieceContainer
getPiece
in interface ITextPieceContainer
index
- index of piece
ITextPieceContainer.getPiece(int)
public int getPieceCount()
ITextPieceContainer
getPieceCount
in interface ITextPieceContainer
sk.uniba.euromath.editor.textEditor.xmlTexts.TextPieceContainer#getPieceCount()
public ITextPieceInfo getInfo(ITextPieceKeeper forPiece)
ITextPieceContainer
getInfo
in interface ITextPieceContainer
forPiece
- ITextPieceKeeper stored in this container
sk.uniba.euromath.editor.textEditor.xmlTexts.TextPieceContainer#getInfo(sk.uniba.euromath.editor.textEditor.xmlTexts.TextPieceKeeper)
public ITextPieceKeeper getNext(ITextPieceKeeper piece)
ITextPieceContainer
getNext
in interface ITextPieceContainer
piece
- asked for successor
piece
is the last partsk.uniba.euromath.editor.textEditor.xmlTexts.TextPieceContainer#getNext(sk.uniba.euromath.editor.textEditor.xmlTexts.TextPieceKeeper)
public ITextPieceKeeper getPrevious(ITextPieceKeeper piece)
ITextPieceContainer
getPrevious
in interface ITextPieceContainer
piece
- asked for predeccessor
piece
is the first partsk.uniba.euromath.editor.textEditor.xmlTexts.TextPieceContainer#getPrevious(sk.uniba.euromath.editor.textEditor.xmlTexts.TextPieceKeeper)
public int indexOf(ITextPieceKeeper piece)
ITextPieceContainer
indexOf
in interface ITextPieceContainer
piece
- asked for index
sk.uniba.euromath.editor.textEditor.xmlTexts.TextPieceContainer#indexOf(sk.uniba.euromath.editor.textEditor.xmlTexts.TextPieceKeeper)
public String getNodeID()
public void setNodeID(String nodeID)
nodeID
- The nodeID to set.public List<ITextPieceKeeper> getAll()
ITextPieceContainer
getAll
in interface ITextPieceContainer
protected String getFullText()
public ITextPieceKeeper OffsetInPieceKeeper(int offset)
OffsetInPieceKeeper
in interface ITextPieceContainer
offset
- offset of whole text in textual Node
public String getWholeContainerText()
getWholeContainerText
in interface ITextPieceContainer
ITextPieceContainer.getWholeContainerText()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |