InputView
InputView 是一個基本實現,提供在有邊界的 Rectangle 中繪製和修改文字的功能。
InputView input = new InputView();
String text = input.getInputText();
預設繫結
預設的 檢視命令 有
| 命令 | 描述 |
|---|---|
LEFT |
游標左移 |
RIGHT |
游標右移 |
DELETE_CHAR_LEFT |
刪除左側字元 |
DELETE_CHAR_RIGHT |
刪除右側字元 |
預設的按鍵繫結是
| 命令 | 描述 |
|---|---|
游標左移 |
繫結 ViewCommand LEFT |
游標右移 |
繫結 ViewCommand RIGHT |
退格 |
繫結 ViewCommand DELETE_CHAR_LEFT |
刪除 |
繫結 ViewCommand DELETE_CHAR_RIGHT |