sk.uniba.euromath.editor.textEditor
Class TextPieceSelectionStatusImpl

java.lang.Object
  extended by sk.uniba.euromath.editor.textEditor.TextPieceSelectionStatusImpl
All Implemented Interfaces:
ITextPieceSelectionStatus

public class TextPieceSelectionStatusImpl
extends Object
implements ITextPieceSelectionStatus

Selection status for text piece.

Author:
Tomáš Studva 24.1.2006 Martin Kollar

Constructor Summary
TextPieceSelectionStatusImpl(ITextPieceKeeper keeper)
          Constructor.
 
Method Summary
 void addSelectionInterval(Interval interval)
          Makes logical OR of interval and this.intervals.
 void clear()
          Sets nothing selected.
 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 in ITextPieceKeeper
 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

TextPieceSelectionStatusImpl

public TextPieceSelectionStatusImpl(ITextPieceKeeper keeper)
Constructor. Creates text selection status for text piece.

Parameters:
keeper - about associated text piece
Method Detail

clear

public void clear()
Sets nothing selected. Clears selection.

Specified by:
clear in interface ITextPieceSelectionStatus

getSelectionIntervals

public List<Interval> getSelectionIntervals()
Description copied from interface: ITextPieceSelectionStatus
Returns selection that relates to this text piece.

Specified by:
getSelectionIntervals in interface ITextPieceSelectionStatus
Returns:
List of Intervals that are not overlaping

isPartlySelected

public boolean isPartlySelected()
Description copied from interface: ITextPieceSelectionStatus
Test if something is selected, but not everything

Specified by:
isPartlySelected in interface ITextPieceSelectionStatus
Returns:
true, if something is selected, but it is not fully selected

isFullySelected

public boolean isFullySelected()
Description copied from interface: ITextPieceSelectionStatus
Test if whole text is selected.

Specified by:
isFullySelected in interface ITextPieceSelectionStatus
Returns:
true, if whole ITextPieceKeeper is selected

setSelectionIntervals

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

Specified by:
setSelectionIntervals in interface ITextPieceSelectionStatus
Parameters:
intervals - Collection of intervals, that are in range text and are not overlaping

addSelectionInterval

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

Specified by:
addSelectionInterval in interface ITextPieceSelectionStatus
Parameters:
interval - Interval to add to selection

xorSelectionIntervals

public void xorSelectionIntervals(Collection<Interval> intervals)
Description copied from interface: ITextPieceSelectionStatus
Makes XOR with this new interval

Specified by:
xorSelectionIntervals in interface ITextPieceSelectionStatus
Parameters:
intervals - Interval to XOR with others
See Also:
ITextPieceSelectionStatus.xorSelectionIntervals(Collection)

subtractSelectionInterval

public void subtractSelectionInterval(Interval interval)
Description copied from interface: ITextPieceSelectionStatus
Subtracts interval from selection

Specified by:
subtractSelectionInterval in interface ITextPieceSelectionStatus
Parameters:
interval - Interval to subtract
See Also:
ITextPieceSelectionStatus.subtractSelectionInterval(Interval)


Copyright © 2003-2006 null. All Rights Reserved.