|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.text.Selection
public class Selection
Utility class for manipulating cursors and selections in CharSequences. A cursor is a selection where the start and end are at the same offset.
| Field Summary | |
|---|---|
static Object |
SELECTION_END
|
static Object |
SELECTION_START
|
| Method Summary | |
|---|---|
static boolean |
extendDown(Spannable text,
Layout layout)
Move the selection end to the buffer offset physically below the current selection end. |
static boolean |
extendLeft(Spannable text,
Layout layout)
Move the selection end to the buffer offset physically to the left of the current selection end. |
static boolean |
extendRight(Spannable text,
Layout layout)
Move the selection end to the buffer offset physically to the right of the current selection end. |
static void |
extendSelection(Spannable text,
int index)
Move the selection edge to offset index. |
static boolean |
extendToLeftEdge(Spannable text,
Layout layout)
|
static boolean |
extendToRightEdge(Spannable text,
Layout layout)
|
static boolean |
extendUp(Spannable text,
Layout layout)
Move the selection end to the buffer offset physically above the current selection end. |
static int |
getSelectionEnd(CharSequence text)
Return the offset of the selection edge or cursor, or -1 if there is no selection or cursor. |
static int |
getSelectionStart(CharSequence text)
Return the offset of the selection anchor or cursor, or -1 if there is no selection or cursor. |
static boolean |
moveDown(Spannable text,
Layout layout)
Move the cursor to the buffer offset physically below the current offset, or return false if the cursor is already on the bottom line. |
static boolean |
moveLeft(Spannable text,
Layout layout)
Move the cursor to the buffer offset physically to the left of the current offset, or return false if the cursor is already at the left edge of the line and there is not another line to move it to. |
static boolean |
moveRight(Spannable text,
Layout layout)
Move the cursor to the buffer offset physically to the right of the current offset, or return false if the cursor is already at at the right edge of the line and there is not another line to move it to. |
static boolean |
moveToLeftEdge(Spannable text,
Layout layout)
|
static boolean |
moveToRightEdge(Spannable text,
Layout layout)
|
static boolean |
moveUp(Spannable text,
Layout layout)
Move the cursor to the buffer offset physically above the current offset, or return false if the cursor is already on the top line. |
static void |
removeSelection(Spannable text)
Remove the selection or cursor, if any, from the text. |
static void |
selectAll(Spannable text)
Select the entire text. |
static void |
setSelection(Spannable text,
int index)
Move the cursor to offset index. |
static void |
setSelection(Spannable text,
int start,
int stop)
Set the selection anchor to start and the selection edge
to stop. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Object SELECTION_START
public static final Object SELECTION_END
| Method Detail |
|---|
public static final int getSelectionStart(CharSequence text)
public static final int getSelectionEnd(CharSequence text)
public static void setSelection(Spannable text,
int start,
int stop)
start and the selection edge
to stop.
public static final void setSelection(Spannable text,
int index)
index.
public static final void selectAll(Spannable text)
public static final void extendSelection(Spannable text,
int index)
index.
public static final void removeSelection(Spannable text)
public static boolean moveUp(Spannable text,
Layout layout)
public static boolean moveDown(Spannable text,
Layout layout)
public static boolean moveLeft(Spannable text,
Layout layout)
public static boolean moveRight(Spannable text,
Layout layout)
public static boolean extendUp(Spannable text,
Layout layout)
public static boolean extendDown(Spannable text,
Layout layout)
public static boolean extendLeft(Spannable text,
Layout layout)
public static boolean extendRight(Spannable text,
Layout layout)
public static boolean extendToLeftEdge(Spannable text,
Layout layout)
public static boolean extendToRightEdge(Spannable text,
Layout layout)
public static boolean moveToLeftEdge(Spannable text,
Layout layout)
public static boolean moveToRightEdge(Spannable text,
Layout layout)
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||