当前位置: 首页>>代码示例>>Java>>正文


Java FormToolkit.createTable方法代码示例

本文整理汇总了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;
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:20,代码来源:DataModelFormPage.java

示例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);
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:5,代码来源:DataModelTableFormPage.java

示例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;
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:7,代码来源:BaseZnodeModelTableFormPage.java


注:本文中的org.eclipse.ui.forms.widgets.FormToolkit.createTable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。