本文整理匯總了Java中org.eclipse.swt.SWT.ICON_CANCEL屬性的典型用法代碼示例。如果您正苦於以下問題:Java SWT.ICON_CANCEL屬性的具體用法?Java SWT.ICON_CANCEL怎麽用?Java SWT.ICON_CANCEL使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.eclipse.swt.SWT
的用法示例。
在下文中一共展示了SWT.ICON_CANCEL屬性的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;
}