向InputDialog添加注释

问题描述 投票:0回答:1

我正在处理Eclipse JFace GUI内容。

我正在读取用户的一些输入,并能够使用验证器进行如下验证。

     // creating input prompt
     InputDialog inputDialog = new InputDialog(parentShell, dialogTitle, dialogMessage, initialValue, validator);

     // Validator
     IInputValidator validator = new IInputValidator()
     {
        @Override
        public String isValid(String newName)
        {
            if (newName.isBlank())
            {
                return "Warning: Input is empty";
            }
            return null;
        }
    };

我要实现的是向用户添加与验证无关的注释。

基本上,注释是关于描述如果按下确定按钮会发生什么情况(如图所示)。>>

enter image description here

任何帮助/想法都将不胜感激。

我正在处理Eclipse JFace GUI东西。我正在读取用户的一些输入,并能够使用验证器进行验证,如下所示。 //创建输入提示InputDialog inputDialog = new ...

java eclipse jface
1个回答
0
投票

您将必须创建一个扩展了InputDialog的新对话框类,以覆盖createDialog来添加其他控件。类似于:

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.