sk.uniba.euromath.editor.textEditor
Interface ITextPieceSelectionStatus

All Known Implementing Classes:
TextPieceSelectionStatusImpl

public interface ITextPieceSelectionStatus

TextPiece can have many small not overlapping selections within. It stores selection Intervals within text piece(0<=start<=end

Author:
Martin Kollar 30.9.2005 Tomas Studva

Method Summary
 void addSelectionInterval(Interval interval)
          Makes logical OR of interval and this.intervals.
 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 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


addSelectionInterval

void addSelectionInterval(Interval interval)
Makes logical OR of interval and this.intervals. Holding property that intervlas are not overlaping.

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.