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.