| java.lang.Object org.gjt.sp.jedit.textarea.SelectionManager
SelectionManager | class SelectionManager (Code) | | |
addToSelection | void addToSelection(Selection[] selection)(Code) | | Adds to the selection. Nested and overlapping selections are merged
where possible. Null elements of the array are ignored.
Parameters: selection - The new selectionsince jEdit 3.2pre1 |
getSelectedLines | int[] getSelectedLines()(Code) | | Returns a sorted array of line numbers on which a selection or
selections are present.
This method is the most convenient way to iterate through selected
lines in a buffer. The line numbers in the array returned by this
method can be passed as a parameter to such methods as
org.gjt.sp.jedit.Buffer.getLineText(int) .
|
getSelection | public Selection[] getSelection()(Code) | | Returns the current selection.
since: jEdit 3.2pre1 |
getSelectionAtOffset | Selection getSelectionAtOffset(int offset)(Code) | | Returns the selection containing the specific offset, or null
if there is no selection at that offset.
Parameters: offset - The offset since: jEdit 3.2pre1 |
getSelectionCount | int getSelectionCount()(Code) | | Returns the number of selections. This can be used to test
for the existence of selections.
|
getSelectionStartAndEnd | int[] getSelectionStartAndEnd(int screenLine, int physicalLine, Selection s)(Code) | | Returns the x co-ordinates of the selection start and end on the
given line. May return null.
|
insideSelection | boolean insideSelection(int x, int y)(Code) | | Returns if the given point is inside a selection.
Used by drag and drop code in MouseHandler below.
|
invertSelection | void invertSelection()(Code) | | |
removeFromSelection | void removeFromSelection(Selection sel)(Code) | | Deactivates the specified selection.
Parameters: sel - The selection |
resizeSelection | void resizeSelection(int offset, int end, int extraEndVirt, boolean rect)(Code) | | Resizes the selection at the specified offset, or creates a new
one if there is no selection at the specified offset. This is a
utility method that is mainly useful in the mouse event handler
because it handles the case of end being before offset gracefully
(unlike the rest of the selection API).
Parameters: offset - The offset Parameters: end - The new selection end Parameters: extraEndVirt - Only for rectangular selections - specifies howfar it extends into virtual space. Parameters: rect - Make the selection rectangular? |
setSelection | void setSelection(Selection[] selection)(Code) | | Sets the selection. Nested and overlapping selections are merged
where possible.
|
setSelection | void setSelection(Selection selection)(Code) | | Sets the selection. Nested and overlapping selections are merged
where possible.
|
|
|