|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.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 piece| Method Detail |
|---|
public void clear()
ITextPieceSelectionStatus
clear in interface ITextPieceSelectionStatuspublic List<Interval> getSelectionIntervals()
ITextPieceSelectionStatus
getSelectionIntervals in interface ITextPieceSelectionStatuspublic boolean isPartlySelected()
ITextPieceSelectionStatus
isPartlySelected in interface ITextPieceSelectionStatustrue, if something is selected, but it is not
fully selectedpublic boolean isFullySelected()
ITextPieceSelectionStatus
isFullySelected in interface ITextPieceSelectionStatustrue, if whole ITextPieceKeeper is selectedpublic void setSelectionIntervals(Collection<Interval> intervals)
ITextPieceSelectionStatus
setSelectionIntervals in interface ITextPieceSelectionStatusintervals - Collection of intervals, that are in range text and
are not overlapingpublic void addSelectionInterval(Interval interval)
ITextPieceSelectionStatus
addSelectionInterval in interface ITextPieceSelectionStatusinterval - Interval to add to selectionpublic void xorSelectionIntervals(Collection<Interval> intervals)
ITextPieceSelectionStatus
xorSelectionIntervals in interface ITextPieceSelectionStatusintervals - Interval to XOR with otherspublic void subtractSelectionInterval(Interval interval)
ITextPieceSelectionStatus
subtractSelectionInterval in interface ITextPieceSelectionStatusinterval - 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 | |||||||||