sk.uniba.euromath.editor.textEditor
Interface ITextPieceKeeper

All Known Implementing Classes:
TextEditPart

public interface ITextPieceKeeper

Keeps piece of text of textual node. This text is localized by locator into segment of one line. Properties of this text are held by ITextPieceInfo.

Author:
Tomáš Studva, Martin Kollár

Method Summary
 void deselect()
          Deselects anything selected.
 String getPreviousText()
          Returns text from node before keeper's text.
 ITextPieceSelectionStatus getSelectionStatus()
          Returns status about which text is selected.
 String getText()
          Returns keeper's text.
 ITextPieceContainer getTextContainer()
          Returns ITextPieceContainer where keeper is held.
 ITextLocator getTextLocator()
          Returns ITextLocator for this keeper.
 ITextPieceInfo getTextPieceInfo()
          Returns ITextPieceInfo about keeper's text piece.
 String getWholeTextToPosition(int index)
          Returns text before keeper's text from node + substring of keeper's text to position index.
 void select()
          Selects whole text.
 void select(int start, int end)
          Selects text starting at position start and ending at position end - 1.
 

Method Detail

getTextContainer

ITextPieceContainer getTextContainer()
Returns ITextPieceContainer where keeper is held.

Returns:
container containing this keeper

getTextLocator

ITextLocator getTextLocator()
Returns ITextLocator for this keeper.

Returns:
text locator to lacate keeped text piece

getTextPieceInfo

ITextPieceInfo getTextPieceInfo()
Returns ITextPieceInfo about keeper's text piece.

Returns:
info for keeped text

getPreviousText

String getPreviousText()
Returns text from node before keeper's text.

Returns:
substring of textual node's text, with start index 0 to offset of first character of keeper's text in node's text.

getWholeTextToPosition

String getWholeTextToPosition(int index)
Returns text before keeper's text from node + substring of keeper's text to position index. Character at position index is not included (it is like substring).

Parameters:
index - local position in text
Returns:
substring of textual node's text, with start index 0 to (offset of first character of keeper's text + position) in node's text.

getText

String getText()
Returns keeper's text.

Returns:
text piece of textual node held by this keeper.

getSelectionStatus

ITextPieceSelectionStatus getSelectionStatus()
Returns status about which text is selected.

Returns:
selection status

select

void select()
Selects whole text.


select

void select(int start,
            int end)
Selects text starting at position start and ending at position end - 1.

Parameters:
start - index of first character in the selection
end - index of first character that is not in the selection

deselect

void deselect()
Deselects anything selected.



Copyright © 2003-2006 null. All Rights Reserved.