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 TypeMethodDescriptionint
Provides the index of the first character designated by the selection.int
Provides the index of the first character in the bufferint
Provides the index of the first "virtual" character after the end of the bufferint
Provides the index of the first character after the last character designated by the selection.void
setBeginIndex
(int beginIndex) Changes the value of the begin index of the selectionvoid
setEndIndex
(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:
getBeginIndex
in 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:
getEndIndex
in interfaceSelection
- Returns:
- the end index
-
getBufferBeginIndex
public int getBufferBeginIndex()Provides the index of the first character in the buffer- Specified by:
getBufferBeginIndex
in 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:
getBufferEndIndex
in 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:
setBeginIndex
in 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:
setEndIndex
in interfaceSelection
- Parameters:
endIndex
- , must be within the buffer index range- Throws:
IndexOutOfBoundsException
- if the beginIndex is out of bounds
-