sk.uniba.euromath.editor.textEditor
Interface ITextPieceSelectionStatus

All Known Implementing Classes:
TextPieceSelectionStatusImpl

public interface ITextPieceSelectionStatus

TextPiece can have many small not overlapping selections within. Selection Intervals are within text piece, with end posibly one behind(0 <= start <= end < length). Every selection interval says what is selected - start and end are indexes of bounding characters start included, end not included in selection. Indexes are in rendered text or one behind.

Author:
Martin Kollar 30.9.2005 Tomas Studva

Method Summary
 void addSelectionInterval(Interval interval)
          Adds interval to selection.
 void clear()
          Clears the selection
 List<Interval> getSelectionIntervals()
          Returns selection that relates to this text piece.
 boolean isFullySelected()
          Test if whole text is selected.
 boolean isPartlySelected()
          Test if something is selected, but not everything
 void selectFull()
          Select whole text of keeper.
 void setSelectionIntervals(Collection<Interval> intervals)
          Sets what is selected
 void subtractSelectionInterval(Interval interval)
          Subtracts interval from selection
 void xorSelectionIntervals(Collection<Interval> intervals)
          Makes XOR with this new interval
 

Method Detail

getSelectionIntervals

List<Interval> getSelectionIntervals()
Returns selection that relates to this text piece.

Returns:
list by copy, not overlapping Intervals within text piece.

isPartlySelected

boolean isPartlySelected()
Test if something is selected, but not everything

Returns:
true, if something is selected, but it is not fully selected

isFullySelected

boolean isFullySelected()
Test if whole text is selected.

Returns:
true, if whole ITextPieceKeeper is selected

setSelectionIntervals

void setSelectionIntervals(Collection<Interval> intervals)
Sets what is selected

Parameters:
intervals - Collection of intervals, that are in range text and are not overlaping

clear

void clear()
Clears the selection


selectFull

void selectFull()
Select whole text of keeper.


addSelectionInterval

void addSelectionInterval(Interval interval)
Adds interval to selection. After addition intervals are tidied to not overlap.

Parameters:
interval - Interval to add to selection

subtractSelectionInterval

void subtractSelectionInterval(Interval interval)
Subtracts interval from selection

Parameters:
interval - Interval to subtract

xorSelectionIntervals

void xorSelectionIntervals(Collection<Interval> intervals)
Makes XOR with this new interval

Parameters:
intervals - Interval to XOR with others


Copyright © 2003-2006 null. All Rights Reserved.