| java.lang.Object org.gjt.sp.jedit.textarea.Selection
Selection | abstract public class Selection implements Cloneable(Code) | | 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:
author: Slava Pestov author: John Gellene (API documentation) version: $Id: Selection.java 10797 2007-10-04 08:59:24Z kpouer $ since: jEdit 3.2pre1 |
Inner Class :public static class Range extends Selection | |
Inner Class :public static class Rect extends Selection | |
Method Summary | |
public Object | clone() | abstract boolean | contentInserted(JEditBuffer buffer, int startLine, int start, int numLines, int length) Called when text is inserted into the buffer. | abstract boolean | contentRemoved(JEditBuffer buffer, int startLine, int start, int numLines, int length) Called when text is removed from the buffer. | public int | getEnd() Returns the end offset of this selection. | abstract public int | getEnd(JEditBuffer buffer, int line) Returns the end of the portion of the selection
falling on the specified line. | public int | getEndLine() Returns the ending line number of this selection. | public int | getStart() Returns the start offset of this selection. | abstract public int | getStart(JEditBuffer buffer, int line) Returns the beginning of the portion of the selection
falling on the specified line. | public int | getStartLine() Returns the starting line number of this selection. | abstract void | getText(JEditBuffer buffer, StringBuffer buf) | public boolean | overlaps(Selection s) Returns if this selection and the specified selection overlap. | abstract int | setText(JEditBuffer buffer, String text) | public String | toString() |
startLineendLine | int startLineendLine(Code) | | |
Selection | protected Selection()(Code) | | |
Selection | protected Selection(int start, int end)(Code) | | |
contentInserted | abstract boolean contentInserted(JEditBuffer buffer, int startLine, int start, int numLines, int length)(Code) | | Called when text is inserted into the buffer.
Parameters: buffer - The buffer in question Parameters: startLine - The first line Parameters: start - The start offset, from the beginning of the buffer Parameters: numLines - The number of lines inserted Parameters: length - The number of characters inserted true if the selection was changed |
contentRemoved | abstract boolean contentRemoved(JEditBuffer buffer, int startLine, int start, int numLines, int length)(Code) | | Called when text is removed from the buffer.
Parameters: buffer - The buffer in question Parameters: startLine - The first line Parameters: start - The start offset, from the beginning of the buffer Parameters: numLines - The number of lines removed Parameters: length - The number of characters removed true if the selection was changed |
getEnd | public int getEnd()(Code) | | Returns the end offset of this selection.
|
getEnd | abstract public int getEnd(JEditBuffer buffer, int line)(Code) | | 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 buffer Parameters: line - The line number since: jEdit 4.1pre1 |
getEndLine | public int getEndLine()(Code) | | Returns the ending line number of this selection.
|
getStart | public int getStart()(Code) | | Returns the start offset of this selection.
|
getStart | abstract public int getStart(JEditBuffer buffer, int line)(Code) | | 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 buffer Parameters: line - The line number since: jEdit 4.1pre1 |
getStartLine | public int getStartLine()(Code) | | Returns the starting line number of this selection.
|
overlaps | public boolean overlaps(Selection s)(Code) | | Returns if this selection and the specified selection overlap.
Parameters: s - The other selection since: jEdit 4.1pre1 |
setText | abstract int setText(JEditBuffer buffer, String text)(Code) | | Replace the selection with the given text
Parameters: buffer - the buffer Parameters: text - the text the offset at the end of the inserted text |
|
|