sk.uniba.euromath.editor.textEditor
Interface ITextPieceContainer

All Known Implementing Classes:
TextPieceContainer

public interface ITextPieceContainer

Container for ITextPieceKeepers. Holds together ITextPieceKeepers for text of one node. They 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 and stores it. Node is identified by id.

Author:
Tomáš Studva

Method Summary
 List<ITextPieceKeeper> getAll()
          Returns all stored ITextPieceKeeper.
 ITextPieceInfo getInfo(ITextPieceKeeper forPiece)
          Returns ITextPieceInfo for ITextPieceKeeper.
 ITextPieceKeeper getNext(ITextPieceKeeper piece)
          Returns next stored ITextPieceKeeper in order they are stored.
 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)
           
 

Method Detail

getPiece

ITextPieceKeeper getPiece(int index)
Returns ITextPieceKeeper stored with index index.

Parameters:
index - of wanted keeper
Returns:
ITextPieceKeeper with index index

getPieceCount

int getPieceCount()
Returns number of all stored pieces.

Returns:
number of all stored pieces

getInfo

ITextPieceInfo getInfo(ITextPieceKeeper forPiece)
Returns ITextPieceInfo for ITextPieceKeeper. This info is the same as ITextPieceKeeper has set.

Parameters:
forPiece - ITextPieceKeeper stored in this container
Returns:
ITextPieceInfo about ITextPieceKeeper forPiece

getAll

List<ITextPieceKeeper> getAll()
Returns all stored ITextPieceKeeper. If is correctly filled by ITextPieceKeepers, than returns all ITexPieceKeepers for node.

Returns:
all stored ITextPieceKeeper

getNext

ITextPieceKeeper getNext(ITextPieceKeeper piece)
Returns next stored ITextPieceKeeper in order they are stored. For ordering see coment for class.

Parameters:
piece - asked for successor
Returns:
successor or null if piece is the last part

getPrevious

ITextPieceKeeper getPrevious(ITextPieceKeeper piece)
Returns previous stored ITextPieceKeeper in order they are stored. For ordering see coment for class.

Parameters:
piece - asked for predeccessor
Returns:
predeccessor or null if piece is the first part

indexOf

int indexOf(ITextPieceKeeper piece)
Returns index of ITextPieceKeeper piece in this container as is stored. For ordering see coment for class.

Parameters:
piece - asked for index
Returns:
returns index of piece

OffsetInPieceKeeper

ITextPieceKeeper OffsetInPieceKeeper(int offset)
Parameters:
offset - offset of whole text in textual Node
Returns:
ITextPieceKeeper in that is this offset

getWholeContainerText

String getWholeContainerText()
Returns:
Text in the Container, that should by not very different from text in TextNode TODO: give a description of that difference and it can occur


Copyright © 2003-2006 null. All Rights Reserved.