本文整理汇总了Java中org.eclipse.ui.forms.widgets.FormToolkit.createTable方法的典型用法代码示例。如果您正苦于以下问题:Java FormToolkit.createTable方法的具体用法?Java FormToolkit.createTable怎么用?Java FormToolkit.createTable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.ui.forms.widgets.FormToolkit
的用法示例。
在下文中一共展示了FormToolkit.createTable方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createTableSection
import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
protected Section createTableSection(ScrolledForm form, Composite client, FormToolkit toolkit, String title,
Image image, int sectionStyle, int tableStyle, String[] columnTitles, int[] columnAlignments) {
Section section = createSection(form, client, toolkit, title, image, sectionStyle);
Table table = toolkit.createTable(section, tableStyle);
for (int i = 0; i < columnTitles.length; i++) {
TableColumn column = new TableColumn(table, SWT.NONE);
column.setText(columnTitles[i]);
column.setAlignment(columnAlignments[i]);
}
table.setHeaderVisible(true);
table.setLinesVisible(true);
section.setClient(table);
return section;
}
示例2: createTable
import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
protected Table createTable(Composite client) {
FormToolkit toolkit = getManagedForm().getToolkit();
return toolkit.createTable(client, DEFAULT_TABLE_STYLE);
}
示例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: createTable
import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
protected Table createTable(IManagedForm managedForm, Composite client) {
FormToolkit toolkit = managedForm.getToolkit();
Table table = toolkit.createTable(client, getTableStyle());
table.setLinesVisible(true);
return table;
}