java.lang.Object
org.gjt.sp.jedit.textarea.Selection
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
Selection.Range
,Selection.Rect
An abstract class that holds data on a region of selected text.
As an abstract class, it cannot be used
directly, but instead serves as a parent class for two specific types
of selection structures:
Selection.Range
- represents an ordinary range of selected text.Selection.Rect
- represents a rectangular selection.
- Since:
- jEdit 3.2pre1
- Version:
- $Id: Selection.java 25283 2020-04-22 08:37:19Z kpouer $
- Author:
- Slava Pestov, John Gellene (API documentation)
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
An ordinary range selection.static class
A rectangular selection. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
int
getEnd()
Returns the end offset of this selection.abstract int
getEnd
(JEditBuffer buffer, int line) Returns the end of the portion of the selection falling on the specified line.int
Returns the ending line number of this selection.int
getStart()
Returns the start offset of this selection.abstract int
getStart
(JEditBuffer buffer, int line) Returns the beginning of the portion of the selection falling on the specified line.int
Returns the starting line number of this selection.boolean
Returns if this selection and the specified selection overlap.toString()
-
Constructor Details
-
Selection
protected Selection() -
Selection
-
Selection
protected Selection(int start, int end) -
Selection
protected Selection(int startLine, int start, int endLine, int end)
-
-
Method Details
-
getStart
public int getStart()Returns the start offset of this selection. -
getEnd
public int getEnd()Returns the end offset of this selection. -
getStart
Returns the beginning of the portion of the selection falling on the specified line. Used to manipulate selection text on a line-by-line basis.- Parameters:
buffer
- The bufferline
- The line number- Since:
- jEdit 4.1pre1
-
getEnd
Returns the end of the portion of the selection falling on the specified line. Used to manipulate selection text on a line-by-line basis.- Parameters:
buffer
- The bufferline
- The line number- Since:
- jEdit 4.1pre1
-
getStartLine
public int getStartLine()Returns the starting line number of this selection. -
getEndLine
public int getEndLine()Returns the ending line number of this selection. -
overlaps
Returns if this selection and the specified selection overlap.- Parameters:
s
- The other selection- Since:
- jEdit 4.1pre1
-
toString
-
clone
-