本文整理汇总了Java中org.eclipse.swt.widgets.Table.setLayoutData方法的典型用法代码示例。如果您正苦于以下问题:Java Table.setLayoutData方法的具体用法?Java Table.setLayoutData怎么用?Java Table.setLayoutData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.widgets.Table
的用法示例。
在下文中一共展示了Table.setLayoutData方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: InterfacesComponent
import org.eclipse.swt.widgets.Table; //导入方法依赖的package包/类
/**
* Creates a new interfaces component inside the parent composite using the given model.
*
* @param interfacesContainingModel
* A interface containing model
* @param container
* The component container
*/
public InterfacesComponent(InterfacesContainingModel interfacesContainingModel,
WizardComponentContainer container) {
super(container);
this.model = interfacesContainingModel;
Composite parent = getParentComposite();
Label interfacesLabel = new Label(parent, SWT.NONE);
GridData interfacesLabelGridData = fillLabelDefaults();
interfacesLabelGridData.verticalAlignment = SWT.TOP;
interfacesLabel.setLayoutData(interfacesLabelGridData);
interfacesLabel.setText("Interfaces:");
interfacesTable = new Table(parent, SWT.BORDER | SWT.FULL_SELECTION | SWT.VIRTUAL);
interfacesTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
Composite interfacesButtonsComposite = new Composite(parent, SWT.NONE);
interfacesButtonsComposite.setLayoutData(GridDataFactory.fillDefaults().create());
interfacesButtonsComposite.setLayout(GridLayoutFactory.swtDefaults().numColumns(1).margins(0, 0).create());
interfacesAddButton = new Button(interfacesButtonsComposite, SWT.NONE);
interfacesAddButton.setText("Add...");
interfacesAddButton.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create());
interfacesRemoveButton = new Button(interfacesButtonsComposite, SWT.NONE);
interfacesRemoveButton.setText("Remove");
interfacesRemoveButton.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create());
setupBindings();
}
示例2: createModelFormContent
import org.eclipse.swt.widgets.Table; //导入方法依赖的package包/类
@Override
protected void createModelFormContent(IManagedForm managedForm, Composite client) {
Table table = createTable(client);
configureTable(table);
table.setLayoutData(getTableFormData());
_TableViewer = createTableViewer(table);
}
示例3: createContents
import org.eclipse.swt.widgets.Table; //导入方法依赖的package包/类
@Override
protected void createContents() {
Label authInfoLabel = new Label(this, SWT.LEAD);
authInfoLabel.setText("Auth Info:");
authInfoLabel.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
_AuthInfoComposite = new ZooKeeperConnectionAuthInfoComposite(this, SWT.NULL);
_AuthInfoComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
GridLayout authInfoCompositeLayout = new GridLayout(2, false);
authInfoCompositeLayout.marginWidth = 0;
authInfoCompositeLayout.marginHeight = 0;
authInfoCompositeLayout.horizontalSpacing = ((GridLayout) getLayout()).horizontalSpacing;
_AuthInfoComposite.setLayout(authInfoCompositeLayout);
Table table = new Table(_AuthInfoComposite, SWT.SINGLE | SWT.FULL_SELECTION | SWT.BORDER | SWT.H_SCROLL
| SWT.V_SCROLL);
GridData tableLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 2);
tableLayoutData.heightHint = 200;
table.setLayoutData(tableLayoutData);
_AuthInfoComposite.setTable(table);
Button addButton = new Button(_AuthInfoComposite, SWT.NULL);
addButton.setText("Add...");
addButton.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, false, false));
_AuthInfoComposite.setAddButton(addButton);
final Button removeButton = new Button(_AuthInfoComposite, SWT.NULL);
removeButton.setText("Remove");
removeButton.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, false, false));
_AuthInfoComposite.setRemoveButton(removeButton);
_AuthInfoComposite.init();
}
示例4: createTable
import org.eclipse.swt.widgets.Table; //导入方法依赖的package包/类
/**
* This method initializes table
*
*/
private void createTable() {
int style = SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL |
SWT.FULL_SELECTION | SWT.HIDE_SELECTION;
table = new Table(this, style);
GridData gridData = new GridData(GridData.FILL_BOTH);
gridData.grabExcessVerticalSpace = true;
gridData.horizontalSpan = 3;
table.setLayoutData(gridData);
table.setLinesVisible(true);
table.setHeaderVisible(true);
}
示例5: createTable
import org.eclipse.swt.widgets.Table; //导入方法依赖的package包/类
private void createTable(Composite parent) {
GridData gridData = new GridData();
gridData.horizontalSpan = numColumns;
gridData.horizontalAlignment = GridData.FILL;
gridData.grabExcessHorizontalSpace = true;
gridData.grabExcessVerticalSpace = true;
gridData.verticalAlignment = GridData.FILL;
table = new Table(parent, SWT.VIRTUAL | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
table.setLayoutData(gridData);
table.setHeaderVisible(true);
table.setLinesVisible(true);
}
示例6: createTable
import org.eclipse.swt.widgets.Table; //导入方法依赖的package包/类
private void createTable() {
GridData gridData = new org.eclipse.swt.layout.GridData();
gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
gridData.grabExcessHorizontalSpace = true;
gridData.grabExcessVerticalSpace = true;
gridData.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
table = new Table(this, SWT.VIRTUAL | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
table.setLayoutData(gridData);
table.setHeaderVisible(true);
table.setLinesVisible(true);
}
示例7: createControl
import org.eclipse.swt.widgets.Table; //导入方法依赖的package包/类
@Override
public void createControl(Composite parent) {
container = new Composite(parent, SWT.NONE);
container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
setControl(container);
container.setLayout(new GridLayout(1, false));
grpSchemaPreview = new Group(container, SWT.NONE);
grpSchemaPreview.setText(SCHEMA_PREVIEW);
grpSchemaPreview.setLayout(new GridLayout(1, false));
grpSchemaPreview.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
composite = new Composite(grpSchemaPreview, SWT.NONE);
composite.setLayout(new GridLayout(1, false));
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
availableFieldTableViewer=new TableViewer(composite,SWT.BORDER);
TableViewerColumn availableFieldsColumn = new TableViewerColumn(availableFieldTableViewer, SWT.NONE);
availableFieldsColumn.setLabelProvider(new AvailableFieldsColumnLabelProvider());
TableColumn tableColumn = availableFieldsColumn.getColumn();
tableColumn.setText(AVAILABLE_FIELDS);
Table table=availableFieldTableViewer.getTable();
table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
table.setLinesVisible(true);
table.setHeaderVisible(true);
addControlListener(table, tableColumn);
}
示例8: createMappingTable
import org.eclipse.swt.widgets.Table; //导入方法依赖的package包/类
private Table createMappingTable(Composite composite_6) {
mappingTableViewer = new TableViewer(composite_6, SWT.BORDER
| SWT.FULL_SELECTION | SWT.MULTI);
Table table = mappingTableViewer.getTable();
table.setLinesVisible(true);
table.setHeaderVisible(true);
GridData gd_table = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_table.widthHint = 374;
table.setLayoutData(gd_table);
mappingTableViewer.setContentProvider(new ArrayContentProvider());
ColumnViewerToolTipSupport.enableFor(mappingTableViewer);
return table;
}
示例9: createSourceTable
import org.eclipse.swt.widgets.Table; //导入方法依赖的package包/类
private void createSourceTable(Composite composite_2) {
sourceTable = new Table(composite_2, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
sourceTable.addMouseListener(new MouseAdapter() {
@Override
public void mouseDoubleClick(MouseEvent e) {
if(sourceTable.getSelection().length==1){
addNewProperty(targetTableViewer, sourceTable.getSelection()[0].getText());
enableControlButtons();
}
}
});
GridData gd_table = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 2);
gd_table.widthHint = 221;
gd_table.heightHint = 407;
sourceTable.setLayoutData(gd_table);
sourceTable.setHeaderVisible(true);
sourceTable.setLinesVisible(true);
TableColumn sourceTableColumnFieldName = new TableColumn(sourceTable, SWT.LEFT);
if(OSValidator.isMac()){
sourceTableColumnFieldName.setWidth(212);
}else{
sourceTableColumnFieldName.setWidth(202);
}
sourceTableColumnFieldName.setText(Messages.AVAILABLE_FIELDS_HEADER);
getSourceFieldsFromPropagatedSchema(sourceTable);
dragSource = new DragSource(sourceTable, DND.DROP_MOVE);
dragSource.setTransfer(new Transfer[] { TextTransfer.getInstance() });
dragSource.addDragListener(new DragSourceAdapter() {
public void dragSetData(DragSourceEvent event) {
// Set the data to be the first selected item's text
event.data = formatDataToTransfer(sourceTable.getSelection());
}
});
}
示例10: createModelFormContent
import org.eclipse.swt.widgets.Table; //导入方法依赖的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
示例11: createHorizantalViewTabItem
import org.eclipse.swt.widgets.Table; //导入方法依赖的package包/类
private void createHorizantalViewTabItem() {
CTabItem tbtmHorizantalView = new CTabItem(tabFolder, SWT.CLOSE);
tbtmHorizantalView.setData(Views.VIEW_NAME_KEY, Views.HORIZONTAL_VIEW_NAME);
tbtmHorizantalView.setText(Views.HORIZONTAL_VIEW_DISPLAY_NAME);
{
Composite composite = new Composite(tabFolder, SWT.NONE);
tbtmHorizantalView.setControl(composite);
composite.setLayout(new GridLayout(1, false));
{
ScrolledComposite scrolledComposite = new ScrolledComposite(composite, SWT.BORDER | SWT.H_SCROLL
| SWT.V_SCROLL);
scrolledComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
scrolledComposite.setExpandHorizontal(true);
scrolledComposite.setExpandVertical(true);
Composite stackLayoutComposite = new Composite(scrolledComposite, SWT.NONE);
StackLayout stackLayout = new StackLayout();
stackLayoutComposite.setLayout(stackLayout);
{
Composite composite_4 = new Composite(stackLayoutComposite, SWT.NONE);
GridLayout gl_composite_4 = new GridLayout(1, false);
gl_composite_4.verticalSpacing = 0;
gl_composite_4.marginWidth = 0;
gl_composite_4.marginHeight = 0;
gl_composite_4.horizontalSpacing = 0;
composite_4.setLayout(gl_composite_4);
{
horizontalViewTableViewer = new TableViewer(composite_4, SWT.BORDER | SWT.FULL_SELECTION);
Table table_1 = horizontalViewTableViewer.getTable();
table_1.setLinesVisible(true);
table_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
}
stackLayout.topControl = composite_4;
}
scrolledComposite.getShowFocusedControl();
scrolledComposite.setShowFocusedControl(true);
scrolledComposite.setContent(stackLayoutComposite);
scrolledComposite.setMinSize(stackLayoutComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
installMouseWheelScrollRecursively(scrolledComposite);
setTableLayoutToMappingTable(horizontalViewTableViewer);
horizontalViewTableViewer.setContentProvider(new ArrayContentProvider());
dataViewLoader.updateDataViewLists();
horizontalViewTableViewer.setInput(gridViewData);
horizontalViewTableViewer.refresh();
for (int i = 0, n = horizontalViewTableViewer.getTable().getColumnCount(); i < n; i++)
horizontalViewTableViewer.getTable().getColumn(i).pack();
horizontalViewTableViewer.refresh();
}
}
}