public class UITextField.CursorPosition
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
character
The character.
|
protected int |
lastOffset
Last x offset
|
protected int |
line
The line.
|
protected int |
textPosition
The text position.
|
| Constructor and Description |
|---|
CursorPosition() |
| Modifier and Type | Method and Description |
|---|---|
Link |
getLink() |
int |
getPosition()
Gets the position of this
UITextField.CursorPosition in the text. |
int |
getXOffset()
Gets the x offset from the left of this
UITextField.CursorPosition inside this UITextField. |
int |
getYOffset()
Gets the x offset from the left of this
UITextField.CursorPosition inside this UITextField. |
void |
jumpBy(int amount)
Moves this
UITextField.CursorPosition by a specified amount. |
void |
jumpLine(boolean backwards)
Moves this
UITextField.CursorPosition to the previous or next line. |
void |
jumpTo(int pos)
Sets this
UITextField.CursorPosition at the specified position in the text. |
void |
jumpToBeginning()
Moves this
UITextField.CursorPosition to the beginning of the text. |
void |
jumpToEnd()
Moves this
UITextField.CursorPosition to the end of the text. |
void |
jumpToLineEnd()
Moves this
UITextField.CursorPosition to the end of the current line. |
void |
jumpToLineStart()
Moves this
UITextField.CursorPosition to the beginning of the current line. |
void |
jumpToNextSpace(boolean backwards)
Moves this
UITextField.CursorPosition to the next space position. |
void |
set(UITextField.CursorPosition position)
Sets this
UITextField.CursorPosition at the same position than position. |
void |
setPosition(int x,
int y)
Sets this
UITextField.CursorPosition line and character position based on coordinates inside this UITextField. |
void |
shiftLeft()
Moves this
UITextField.CursorPosition one step to the left. |
void |
shiftRight()
Moves this
UITextField.CursorPosition one step to the right. |
java.lang.String |
toString() |
protected int textPosition
protected int character
protected int line
protected int lastOffset
public void set(UITextField.CursorPosition position)
UITextField.CursorPosition at the same position than position.position - the new positionpublic int getPosition()
UITextField.CursorPosition in the text.public void jumpTo(int pos)
UITextField.CursorPosition at the specified position in the text.pos - the new cursor positionpublic void jumpBy(int amount)
UITextField.CursorPosition by a specified amount.amount - the amountpublic void jumpToBeginning()
UITextField.CursorPosition to the beginning of the text.public void jumpToEnd()
UITextField.CursorPosition to the end of the text.public void jumpToLineStart()
UITextField.CursorPosition to the beginning of the current line.public void jumpToLineEnd()
UITextField.CursorPosition to the end of the current line.public void shiftLeft()
UITextField.CursorPosition one step to the left. If the cursor is at the beginning of the line, it is moved to the end of
the previous line without changing the textPosition.public void shiftRight()
UITextField.CursorPosition one step to the right. If the cursor is at the end of the line, it is moved to the start of the
next line whithout changing the textPosition.public void jumpToNextSpace(boolean backwards)
UITextField.CursorPosition to the next space position.backwards - backwards whether to look left of the cursorpublic void jumpLine(boolean backwards)
UITextField.CursorPosition to the previous or next line.backwards - if true, jump to the previous line, jump to the next otherwisepublic void setPosition(int x,
int y)
UITextField.CursorPosition line and character position based on coordinates inside this UITextField.x - the X coordinatey - the Y coordinatepublic int getXOffset()
UITextField.CursorPosition inside this UITextField.public int getYOffset()
UITextField.CursorPosition inside this UITextField.public Link getLink()
public java.lang.String toString()
toString in class java.lang.Object