Class SelectionImpl
java.lang.Object
fr.istic.aco.editor.core.SelectionImpl
-
Constructor Summary
ConstructorsConstructorDescriptionSelectionImpl(StringBuilder buffer) SelectionImpl(StringBuilder buffer, int beginIndex, int endIndex) -
Method Summary
Modifier and TypeMethodDescriptionintProvides the index of the first character designated by the selection.intProvides the index of the first character in the bufferintProvides the index of the first "virtual" character after the end of the bufferintProvides the index of the first character after the last character designated by the selection.voidsetBeginIndex(int beginIndex) Changes the value of the begin index of the selectionvoidsetEndIndex(int endIndex) Changes the value of the end index of the selection
-
Constructor Details
-
SelectionImpl
-
SelectionImpl
-
-
Method Details
-
getBeginIndex
public int getBeginIndex()Provides the index of the first character designated by the selection.- Specified by:
getBeginIndexin interfaceSelection- Returns:
- the begin index
-
getEndIndex
public int getEndIndex()Provides the index of the first character after the last character designated by the selection.- Specified by:
getEndIndexin interfaceSelection- Returns:
- the end index
-
getBufferBeginIndex
public int getBufferBeginIndex()Provides the index of the first character in the buffer- Specified by:
getBufferBeginIndexin interfaceSelection- Returns:
- the buffer's begin index
-
getBufferEndIndex
public int getBufferEndIndex()Provides the index of the first "virtual" character after the end of the buffer- Specified by:
getBufferEndIndexin interfaceSelection- Returns:
- the post end buffer index
-
setBeginIndex
public void setBeginIndex(int beginIndex) Changes the value of the begin index of the selection- Specified by:
setBeginIndexin interfaceSelection- Parameters:
beginIndex- , must be within the buffer index range- Throws:
IndexOutOfBoundsException- if the beginIndex is out of bounds
-
setEndIndex
public void setEndIndex(int endIndex) Changes the value of the end index of the selection- Specified by:
setEndIndexin interfaceSelection- Parameters:
endIndex- , must be within the buffer index range- Throws:
IndexOutOfBoundsException- if the beginIndex is out of bounds
-