本文整理汇总了Java中org.eclipse.ui.forms.widgets.FormToolkit.adapt方法的典型用法代码示例。如果您正苦于以下问题:Java FormToolkit.adapt方法的具体用法?Java FormToolkit.adapt怎么用?Java FormToolkit.adapt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.ui.forms.widgets.FormToolkit
的用法示例。
在下文中一共展示了FormToolkit.adapt方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createModelFormContent
import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
@Override
protected void createModelFormContent(IManagedForm managedForm, Composite client) {
FormToolkit toolkit = managedForm.getToolkit();
_ScrolledFormText = new ScrolledFormText(client, false);
_ScrolledFormText.setExpandHorizontal(true);
toolkit.adapt(_ScrolledFormText, false, false);
_JmxDocFormText = toolkit.createFormText(_ScrolledFormText, true);
_ScrolledFormText.setFormText(_JmxDocFormText);
JmxDocFormText.initFormText(_JmxDocFormText);
FormData scrolledFormTextFormData = new FormData();
scrolledFormTextFormData.top = new FormAttachment(0, 0);
scrolledFormTextFormData.left = new FormAttachment(0, 0);
scrolledFormTextFormData.right = new FormAttachment(100, 0);
scrolledFormTextFormData.bottom = new FormAttachment(100, 0);
_ScrolledFormText.setLayoutData(scrolledFormTextFormData);
}
示例2: createClient
import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
protected final Composite createClient(IManagedForm managedForm, Composite body) {
FormToolkit toolkit = managedForm.getToolkit();
Composite client = new Composite(body, SWT.NULL) {
@Override
public Point computeSize(int wHint, int hHint, boolean changed) {
Point superSize = super.computeSize(wHint, hHint, changed);
return new Point(0, superSize.y);
}
};
toolkit.adapt(client);
client.setLayout(createClientLayout());
return client;
}
示例3: createModelFormContent
import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
@Override
protected void createModelFormContent(IManagedForm managedForm, Composite client) {
FormToolkit toolkit = managedForm.getToolkit();
_TableViewerOrchestrationComposite = createTableViewerOrchestrationComposite(client);
toolkit.adapt(_TableViewerOrchestrationComposite);
FormLayout compositeLayout = new FormLayout();
compositeLayout.marginHeight = 0;
compositeLayout.marginWidth = 0;
compositeLayout.spacing = 8;
_TableViewerOrchestrationComposite.setLayout(compositeLayout);
_TableViewerOrchestrationComposite.setLayoutData(client.getLayoutData());
Table table = toolkit.createTable(_TableViewerOrchestrationComposite, SWT.SINGLE | SWT.FULL_SELECTION
| SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
_TableViewerOrchestrationComposite.setTable(table);
Button addButton = toolkit.createButton(_TableViewerOrchestrationComposite, "&Add", SWT.PUSH);
_TableViewerOrchestrationComposite.setAddButton(addButton);
Button removeButton = toolkit.createButton(_TableViewerOrchestrationComposite, "&Remove", SWT.PUSH);
_TableViewerOrchestrationComposite.setRemoveButton(removeButton);
FormData tableFormData = new FormData();
tableFormData.top = new FormAttachment(0, 0);
tableFormData.left = new FormAttachment(0, 0);
tableFormData.bottom = new FormAttachment(100, 0);
tableFormData.right = new FormAttachment(addButton, 0, SWT.LEFT);
table.setLayoutData(tableFormData);
FormData addButtonFormData = new FormData();
addButtonFormData.top = new FormAttachment(0, 0);
addButtonFormData.left = new FormAttachment(removeButton, 0, SWT.LEFT);
addButtonFormData.right = new FormAttachment(100, 0);
addButton.setLayoutData(addButtonFormData);
FormData removeButtonFormData = new FormData();
removeButtonFormData.top = new FormAttachment(addButton, 0);
removeButtonFormData.right = new FormAttachment(100, 0);
removeButton.setLayoutData(removeButtonFormData);
_TableViewerOrchestrationComposite.addOrchestrationCompositeListener(new IOrchestrationCompositeListener() {
@Override
public void orchestrationChange(EventObject e) {
setDirtyInternal(true);
}
});
_TableViewerOrchestrationComposite.init();
}
开发者ID:baloise,项目名称:eZooKeeper,代码行数:55,代码来源:TableViewerOrchestrationZooKeeperConnectionModelFormPage.java
示例4: createAsCombo
import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
protected void createAsCombo(Composite parent, FormToolkit toolkit) {
T[] displayedValues = getDisplayedValues();
String[] valuesAsString = getValuesAsString(displayedValues);
combo = new Combo(parent, SWT.READ_ONLY);
toolkit.adapt(combo);
combo.setItems(valuesAsString);
update();
combo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
T selectedValue = getSelectedValueFromCombo(combo.getSelectionIndex());
changeAttribute(getCurrentValue(), getNewValue(selectedValue));
}
});
}