本文整理汇总了Java中org.eclipse.swt.SWT.ICON_SEARCH属性的典型用法代码示例。如果您正苦于以下问题:Java SWT.ICON_SEARCH属性的具体用法?Java SWT.ICON_SEARCH怎么用?Java SWT.ICON_SEARCH使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.swt.SWT
的用法示例。
在下文中一共展示了SWT.ICON_SEARCH属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createDialogArea
@Override
protected Control createDialogArea(Composite parent) {
Composite container = new Composite(parent, SWT.NONE);
container.setLayout(new GridLayout(2, true));
container.setLayoutData(new GridData(GridData.FILL_BOTH));
Composite searchComposite = new Composite(container, SWT.NONE);
GridLayout layout = new GridLayout(2, false);
layout.marginHeight = 0;
layout.marginWidth = 0;
searchComposite.setLayout(layout);
searchComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
Label txtFilter = new Label(searchComposite, SWT.NONE);
txtFilter.setText(Messages.CodeFilter_search_by_code);
txtFilter.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
text = new Text(searchComposite, SWT.BORDER | SWT.SEARCH | SWT.ICON_SEARCH | SWT.ICON_CANCEL);
text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
text.setText(filter.getPattern());
btnRegEx = new Button(searchComposite, SWT.CHECK);
btnRegEx.setText(Messages.diffTableViewer_use_regular_expressions);
btnRegEx.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
btnRegEx.setSelection(filter.isUseRegex());
new Label(container, SWT.NONE).setText(Messages.FilterDialog_show_object_types);
new Label(container, SWT.NONE).setText(Messages.FilterDialog_show_change_types);
objViewer = CheckboxTableViewer.newCheckList(container, SWT.BORDER);
objViewer.add(new DbObjType[] {DbObjType.SCHEMA, DbObjType.EXTENSION, DbObjType.TYPE,
DbObjType.DOMAIN, DbObjType.SEQUENCE, DbObjType.FUNCTION, DbObjType.TABLE,
DbObjType.VIEW, DbObjType.CONSTRAINT, DbObjType.INDEX, DbObjType.TRIGGER,
DbObjType.RULE});
objViewer.setCheckedElements(types.toArray());
objViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
chgViewer = CheckboxTableViewer.newCheckList(container, SWT.BORDER);
chgViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
chgViewer.setContentProvider(ArrayContentProvider.getInstance());
chgViewer.setLabelProvider(new LabelProvider() {
@Override
public String getText(Object element) {
switch (((DiffSide) element)) {
case BOTH: return "edit"; //$NON-NLS-1$
case LEFT: return "project"; //$NON-NLS-1$
case RIGHT: return "remote"; //$NON-NLS-1$
default: return null;
}
}
});
chgViewer.setInput(DiffSide.values());
chgViewer.setCheckedElements(sides.toArray());
return searchComposite;
}