当您设置eclipse插件首选项页面时,是否可以在FieldEditors之间添加某种文本或分隔行?
@Override
protected void createFieldEditors() {
addField( new SomeFieldEditor(....));
addField( new SomeFieldEditor(....));
}发布于 2014-11-24 13:11:26
您可以使用以下内容:
Label label = new Label(getFieldEditorParent(), SWT.NONE);
label.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 3, 1));若要添加类似的空白,或
Label label = new Label(getFieldEditorParent(), SWT.SEPARATOR | SWT.HORIZONTAL);
label.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 3, 1));若要添加水平分隔符,请执行以下操作。
这假设您使用的是GRID布局。您可能必须根据字段编辑器最终使用的列数来调整GridData中的“3”。
https://stackoverflow.com/questions/27105232
复制相似问题