|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lessvoid.nifty.controls.textfield.TextFieldLogic
public class TextFieldLogic
TextField logic.
Constructor Summary | |
---|---|
TextFieldLogic(String newText,
Clipboard newClipboard,
TextFieldView textFieldView)
Create TextField with clipboard support. |
Method Summary | |
---|---|
void |
backspace()
Backspace. |
void |
copy(Character passwordChar)
Copy currently selected text to clipboard. |
void |
cursorLeft()
Move cursor left. |
void |
cursorRight()
Move cursor right. |
void |
cut(Character passwordChar)
Cut the selected text into the clipboard. |
void |
delete()
Delete the character at the cursor position. |
void |
endSelecting()
end selecting. |
int |
getCursorPosition()
Get cursor position. |
String |
getSelectedText()
Return the selected text or null when there is no selection. |
int |
getSelectionEnd()
Get selection end. |
int |
getSelectionStart()
Get selection start. |
String |
getText()
Return the current text. |
boolean |
hasSelection()
checks if we currently have a selection. |
void |
initWithText(String newText)
init instance wit the given text. |
void |
insert(char c)
Insert character at cursor position. |
void |
put()
Put data from clipboard into textfield. |
void |
resetSelection()
reset the selection. |
void |
setCursorPosition(int newIndex)
Set new cursor position. |
void |
setMaxLength(int maxLen)
|
void |
startSelecting()
start selecting. |
void |
toFirstPosition()
Position cursor to first character. |
void |
toLastPosition()
Position cursor to last character. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextFieldLogic(String newText, Clipboard newClipboard, TextFieldView textFieldView)
newText
- init textnewClipboard
- clipboardMethod Detail |
---|
public void initWithText(String newText)
newText
- new textpublic String getText()
public int getCursorPosition()
public void cursorLeft()
public void cursorRight()
public void delete()
public boolean hasSelection()
public void toFirstPosition()
public void toLastPosition()
public void backspace()
public void resetSelection()
public void insert(char c)
c
- public void setCursorPosition(int newIndex)
newIndex
- index.public int getSelectionStart()
public int getSelectionEnd()
public void startSelecting()
public void endSelecting()
public String getSelectedText()
public void cut(Character passwordChar)
passwordChar
- password character might be nullpublic void copy(Character passwordChar)
passwordChar
- password character might be nullpublic void put()
public void setMaxLength(int maxLen)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |