InputView
InputView 是一個基礎實現,提供在限定 Rectangle 內繪製和修改文字的功能。
InputView input = new InputView();
String text = input.getInputText();
預設繫結
預設的 view commands 有
命令 | 描述 |
---|---|
LEFT |
游標左移 |
RIGHT |
游標右移 |
DELETE_CHAR_LEFT |
刪除左側字元 |
DELETE_CHAR_RIGHT |
刪除右側字元 |
預設的 key bindings 有
命令 | 描述 |
---|---|
CursorLeft |
繫結的 ViewCommand LEFT |
CursorRight |
繫結的 ViewCommand RIGHT |
Backspace |
繫結的 ViewCommand DELETE_CHAR_LEFT |
Delete |
繫結的 ViewCommand DELETE_CHAR_RIGHT |