Java Code Examples for org.eclipse.ui.forms.widgets.FormToolkit#createTable()
The following examples show how to use
org.eclipse.ui.forms.widgets.FormToolkit#createTable() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FilesPage.java From typescript.java with MIT License | 6 votes |
private void createScopeSection(Composite parent) { FormToolkit toolkit = super.getToolkit(); Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR); section.setDescription(TsconfigEditorMessages.FilesPage_ScopeSection_desc); section.setText(TsconfigEditorMessages.FilesPage_ScopeSection_title); TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB); section.setLayoutData(data); Composite client = toolkit.createComposite(section); section.setClient(client); GridLayout layout = new GridLayout(); layout.numColumns = 1; layout.marginWidth = 2; layout.marginHeight = 2; client.setLayout(layout); Table table = toolkit.createTable(client, SWT.NONE); GridData gd = new GridData(GridData.FILL_BOTH); gd.heightHint = 200; gd.widthHint = 100; table.setLayoutData(gd); }
Example 2
Source File: ApplicationOverviewEditorPart.java From codewind-eclipse with Eclipse Public License 2.0 | 5 votes |
public LinkTable(Composite composite, FormToolkit toolkit, String projectColumnLabel) { // Create a composite for the table so can use TableColumnLayout tableComp = toolkit.createComposite(composite, SWT.NONE); TableColumnLayout tableColumnLayout = new TableColumnLayout(); tableComp.setLayout(tableColumnLayout); tableComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1)); linkTable = toolkit.createTable(tableComp, SWT.BORDER | SWT.H_SCROLL | SWT.MULTI | SWT.FULL_SELECTION); GridData data = new GridData(SWT.FILL, SWT.FILL, true, true); data.heightHint = 100; linkTable.setLayoutData(data); // Columns projectColumn = new TableColumn(linkTable, SWT.NONE); projectColumn.setText(projectColumnLabel); projectColumn.setResizable(true); envVarColumn = new TableColumn(linkTable, SWT.NONE); envVarColumn.setText(Messages.LinkMgmtEnvVarColumn); envVarColumn.setResizable(true); linkTable.setHeaderVisible(true); linkTable.setLinesVisible(true); Arrays.stream(linkTable.getColumns()).forEach(TableColumn::pack); tableColumnLayout.setColumnData(projectColumn, new ColumnWeightData(10, Math.max(50, projectColumn.getWidth()), true)); tableColumnLayout.setColumnData(envVarColumn, new ColumnWeightData(10, Math.max(50, envVarColumn.getWidth()), true)); }
Example 3
Source File: ValidateableConstantSectionPart.java From tlaplus with MIT License | 5 votes |
/** * create the table (no check boxes) */ @Override protected Table createTable(Composite sectionArea, FormToolkit toolkit) { Table table = toolkit.createTable(sectionArea, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.FULL_SELECTION); table.setLinesVisible(false); table.setHeaderVisible(false); return table; }
Example 4
Source File: ValidateableTableSectionPart.java From tlaplus with MIT License | 5 votes |
/** * Creates the table to be put into the tableviewer * @param sectionArea * @return */ protected Table createTable(Composite sectionArea, FormToolkit toolkit) { Table table = toolkit.createTable(sectionArea, SWT.MULTI | SWT.CHECK | SWT.V_SCROLL | SWT.H_SCROLL | SWT.FULL_SELECTION); table.setLinesVisible(false); table.setHeaderVisible(false); return table; }
Example 5
Source File: ContractConstraintsTableViewer.java From bonita-studio with GNU General Public License v2.0 | 4 votes |
public ContractConstraintsTableViewer(final Composite parent, final FormToolkit toolkit) { super(toolkit.createTable(parent, GTKStyleHandler.removeBorderFlag(SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI))); getTable().setData(SWTBotConstants.SWTBOT_WIDGET_ID_KEY, SWTBotConstants.SWTBOT_ID_CONTRACT_CONSTRAINT_TABLE); }