|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.editor.textEditor.TextPieceSelectionStatusImpl
public class TextPieceSelectionStatusImpl
Selection status for text piece. To store intervals is used HashSet instead of bit map, because most selections are very simple - one big interval.
Constructor Summary | |
---|---|
TextPieceSelectionStatusImpl(ITextPieceKeeper keeper)
Constructor. |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextPieceSelectionStatusImpl(ITextPieceKeeper keeper)
keeper
- about associated text pieceMethod Detail |
---|
public void clear()
ITextPieceSelectionStatus
clear
in interface ITextPieceSelectionStatus
public List<Interval> getSelectionIntervals()
ITextPieceSelectionStatus
getSelectionIntervals
in interface ITextPieceSelectionStatus
public boolean isPartlySelected()
ITextPieceSelectionStatus
isPartlySelected
in interface ITextPieceSelectionStatus
true
, if something is selected, but it is not
fully selectedpublic boolean isFullySelected()
ITextPieceSelectionStatus
isFullySelected
in interface ITextPieceSelectionStatus
true
, if whole ITextPieceKeeper is selectedpublic void setSelectionIntervals(Collection<Interval> intervals)
ITextPieceSelectionStatus
setSelectionIntervals
in interface ITextPieceSelectionStatus
intervals
- Collection of intervals, that are in range text and
are not overlapingpublic void addSelectionInterval(Interval interval)
ITextPieceSelectionStatus
addSelectionInterval
in interface ITextPieceSelectionStatus
interval
- Interval to add to selectionpublic void xorSelectionIntervals(Collection<Interval> intervals)
ITextPieceSelectionStatus
xorSelectionIntervals
in interface ITextPieceSelectionStatus
intervals
- Interval to XOR with otherspublic void subtractSelectionInterval(Interval interval)
ITextPieceSelectionStatus
subtractSelectionInterval
in interface ITextPieceSelectionStatus
interval
- Interval to subtractpublic void selectFull()
ITextPieceSelectionStatus
selectFull
in interface ITextPieceSelectionStatus
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |