InputView

InputView 是一個基本實現,提供在有邊界的 Rectangle 中繪製和修改文字的功能。

InputView input = new InputView();
String text = input.getInputText();

預設繫結

預設的 檢視命令

表 1. ViewCommands
命令 描述

LEFT

游標左移

RIGHT

游標右移

DELETE_CHAR_LEFT

刪除左側字元

DELETE_CHAR_RIGHT

刪除右側字元

預設的按鍵繫結

表 2. 鍵
命令 描述

游標左移

繫結 ViewCommand LEFT

游標右移

繫結 ViewCommand RIGHT

退格

繫結 ViewCommand DELETE_CHAR_LEFT

刪除

繫結 ViewCommand DELETE_CHAR_RIGHT

事件

事件根據所使用的列表型別傳送。

表 3. InputView 事件
事件 描述

InputViewTextChangeEvent

輸入文字已更改

© . This site is unofficial and not affiliated with VMware.