Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.togethersoft.openapi.ide.editor
Interface IdeEditorSelection

public interface IdeEditorSelection

Represents a selection within a document. It is possible to get or set the start, or the end positions of this selection.

To select the whole line you should set the selection's end to the beginning of the next line. For example, to select the line #20: ``

     import com.togethersoft.openapi.util.text.TextPosition;
     ...
     IdeEditorSelection selection = someEditor.getSelection(IdeEditorSelectionType.PRIMARY);
     selection.setSelectionStart(new TextPosition(20,1));
     selection.setSelectionEnd(new TextPosition(21,1));

Author:
  TogetherSoft
See Also: IdeEditorSelectionType, IdeEditor.getSelection(java.lang.String)

Method Summary
`TextPosition` | `getSelectionEnd()` Returns a `TextPosition` object containing information about the end of this selection.
`TextPosition` | `getSelectionStart()` Returns a `TextPosition` object containing information about the start of this selection.
`void` | `setSelectionEnd(TextPosition position)` Sets the end position of this selection.
`void` | `setSelectionStart(TextPosition position)` Sets the start position of this selection.

Method Detail

### getSelectionEnd

    public TextPosition getSelectionEnd()

  Returns a `TextPosition` object containing information about the end of this selection.
  Returns: a `TextPosition`
  See Also:
    TextPosition

### getSelectionStart

    public TextPosition getSelectionStart()

  Returns a `TextPosition` object containing information about the start of this selection.
  Returns: a `TextPosition`
  See Also:
    TextPosition

### setSelectionEnd

    public void setSelectionEnd(TextPosition position)

  Sets the end position of this selection.
  Parameters:
    position - a `TextPosition` instance
  See Also:
    TextPosition

### setSelectionStart

    public void setSelectionStart(TextPosition position)

  Sets the start position of this selection.
  Parameters:
    position - a `TextPosition` instance
  See Also:
    TextPosition

Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD