Class SelectionImpl

java.lang.Object
fr.istic.aco.editor.core.SelectionImpl
All Implemented Interfaces:
Selection

public class SelectionImpl extends Object implements Selection
Provides access to selection control operations
  • Constructor Details

    • SelectionImpl

      public SelectionImpl(StringBuilder buffer)
    • SelectionImpl

      public SelectionImpl(StringBuilder buffer, int beginIndex, int endIndex)
  • Method Details

    • getBeginIndex

      public int getBeginIndex()
      Provides the index of the first character designated by the selection.
      Specified by:
      getBeginIndex in interface Selection
      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 interface Selection
      Returns:
      the end index
    • getBufferBeginIndex

      public int getBufferBeginIndex()
      Provides the index of the first character in the buffer
      Specified by:
      getBufferBeginIndex in interface Selection
      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 interface Selection
      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 interface Selection
      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 interface Selection
      Parameters:
      endIndex - , must be within the buffer index range
      Throws:
      IndexOutOfBoundsException - if the beginIndex is out of bounds