Java Code Examples for org.eclipse.swt.widgets.TableColumn#setMoveable()
The following examples show how to use
org.eclipse.swt.widgets.TableColumn#setMoveable() .
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: CommandPage.java From EasyShell with Eclipse Public License 2.0 | 6 votes |
private void createColumns(final Composite parent, final TableViewer viewer) { String[] titles = { Activator.getResourceString("easyshell.command.page.header.title.column0"), Activator.getResourceString("easyshell.command.page.header.title.column1"), Activator.getResourceString("easyshell.command.page.header.title.column2"), Activator.getResourceString("easyshell.command.page.header.title.column3") }; int[] bounds = { 100, 100, 80, 400 }; // create for (int i=0;i<titles.length;i++) { TableViewerColumn viewerColumn = new TableViewerColumn(viewer, SWT.NONE); TableColumn column = viewerColumn.getColumn(); column.setText(titles[i]); column.setWidth(bounds[i]); column.setResizable(true); column.setMoveable(true); } }
Example 2
Source File: TableCombo.java From translationstudio8 with GNU General Public License v2.0 | 6 votes |
/** * Defines what columns the drop down table will have. * @param columnHeaders * @param columnBounds */ private void defineColumnsInternal(String[] columnHeaders, int[] columnBounds, int totalColumnsToBeCreated) { checkWidget(); int totalColumnHeaders = columnHeaders == null ? 0 : columnHeaders.length; int totalColBounds = columnBounds == null ? 0 : columnBounds.length; if (totalColumnsToBeCreated > 0) { for (int index = 0; index < totalColumnsToBeCreated; index++) { TableColumn column = new TableColumn(table, SWT.NONE); if (index < totalColumnHeaders) { column.setText(columnHeaders[index]); } if (index < totalColBounds) { column.setWidth(columnBounds[index]); } column.setResizable(true); column.setMoveable(true); } } }
Example 3
Source File: TableViewerBuilder.java From n4js with Eclipse Public License 1.0 | 6 votes |
@Override protected TableViewer createViewer(final Composite parent, final AbstractColumnLayout columnLayout, final int style) { final TableViewer viewer = new TableViewer(parent, style); final Table table = viewer.getTable(); table.setLinesVisible(linesVisible); table.setHeaderVisible(headerVisible); int columnIndex = 0; for (final String columnLabel : columnLabels) { final TableViewerColumn viewerColumn = new TableViewerColumn(viewer, NONE); final TableColumn column = viewerColumn.getColumn(); columnLayout.setColumnData(column, createColumnLayoutData(columnIndex)); column.setText(columnLabel); column.setMoveable(moveable); columnIndex++; } return viewer; }
Example 4
Source File: MenuPage.java From EasyShell with Eclipse Public License 2.0 | 6 votes |
private void createColumns(final Composite parent, final TableViewer viewer) { TableViewerColumn viewerColumn1 = new TableViewerColumn(viewer, SWT.NONE); TableColumn column1 = viewerColumn1.getColumn(); column1.setText(Activator.getResourceString("easyshell.menu.page.header.title.column0")); column1.setWidth(200); column1.setResizable(true); column1.setMoveable(true); TableViewerColumn viewerColumn2 = new TableViewerColumn(viewer, SWT.NONE); TableColumn column2 = viewerColumn2.getColumn(); column2.setText(Activator.getResourceString("easyshell.menu.page.header.title.column1")); column2.setWidth(400); column2.setResizable(true); column2.setMoveable(true); }
Example 5
Source File: BlockDetailDisplay.java From elexis-3-core with Eclipse Public License 1.0 | 5 votes |
private TableViewerColumn createTableViewerColumn(String title, int bound, int colNumber, int style){ final TableViewerColumn viewerColumn = new TableViewerColumn(viewer, style); final TableColumn column = viewerColumn.getColumn(); column.setText(title); column.setWidth(bound); column.setResizable(true); column.setMoveable(false); return viewerColumn; }
Example 6
Source File: TextTemplateView.java From elexis-3-core with Eclipse Public License 1.0 | 5 votes |
private TableViewerColumn createTableViewerColumn(String title, int bound, final int colNumber){ final TableViewerColumn viewerColumn = new TableViewerColumn(tableViewer, SWT.NONE); final TableColumn column = viewerColumn.getColumn(); tableLayout.setColumnData(column, new ColumnWeightData(bound, ColumnWeightData.MINIMUM_WIDTH, true)); column.setText(title); column.setResizable(true); column.setMoveable(false); column.addSelectionListener(getSelectionAdapter(column, colNumber)); return viewerColumn; }
Example 7
Source File: EnvironmentVariablesTable.java From Eclipse-Environment-Variables with MIT License | 5 votes |
private TableColumn createColumn(final Table table, final TableColumnLayout columnLayout, final String text) { final TableColumn column = new TableColumn(table, SWT.NONE); column.setText(text); column.setMoveable(true); columnLayout.setColumnData(column, new ColumnWeightData(50, true)); return column; }
Example 8
Source File: StatisticsView.java From CogniCrypt with Eclipse Public License 2.0 | 5 votes |
private TableViewerColumn createTableViewerColumn(String title, int bound, final int colNumber) { final TableViewerColumn viewerColumn = new TableViewerColumn(viewer, SWT.NONE); final TableColumn column = viewerColumn.getColumn(); column.setText(title); column.setWidth(bound); column.setResizable(true); column.setMoveable(true); return viewerColumn; }
Example 9
Source File: VerrechnungsDisplay.java From elexis-3-core with Eclipse Public License 1.0 | 5 votes |
private TableViewerColumn createTableViewerColumn(String title, int weight, int colNumber, int style){ final TableViewerColumn viewerColumn = new TableViewerColumn(viewer, style); final TableColumn column = viewerColumn.getColumn(); column.setText(title); column.setResizable(true); column.setMoveable(false); tableLayout.setColumnData(column, new ColumnWeightData(weight)); return viewerColumn; }
Example 10
Source File: OneRendererPaginationTableAtHandExample.java From nebula with Eclipse Public License 2.0 | 5 votes |
private static TableViewerColumn createTableViewerColumn( TableViewer viewer, String title, int bound) { final TableViewerColumn viewerColumn = new TableViewerColumn(viewer, SWT.NONE); final TableColumn column = viewerColumn.getColumn(); column.setText(title); column.setWidth(bound); column.setResizable(true); column.setMoveable(true); return viewerColumn; }
Example 11
Source File: ModelSortPageableTableWorkInProcessExample.java From nebula with Eclipse Public License 2.0 | 5 votes |
private static TableViewerColumn createTableViewerColumn( TableViewer viewer, String title, int bound) { final TableViewerColumn viewerColumn = new TableViewerColumn(viewer, SWT.NONE); final TableColumn column = viewerColumn.getColumn(); column.setText(title); column.setWidth(bound); column.setResizable(true); column.setMoveable(true); return viewerColumn; }
Example 12
Source File: InvoiceCorrectionView.java From elexis-3-core with Eclipse Public License 1.0 | 5 votes |
private TableViewerColumn createTableViewerColumn(String title, int bound, int colIdx){ final TableViewerColumn viewerColumn = new TableViewerColumn(tableViewer, SWT.NONE); TableColumn column = viewerColumn.getColumn(); column.setText(title); tableColumnLayout.setColumnData(column, new ColumnWeightData(bound, ColumnWeightData.MINIMUM_WIDTH, true)); column.setResizable(true); column.setMoveable(false); viewerColumn.setLabelProvider(new DefaultColumnLabelProvider(colIdx)); return viewerColumn; }
Example 13
Source File: AbstractNativeHeader.java From nebula with Eclipse Public License 2.0 | 5 votes |
private void initializeColumns() { this.tableColumns = new ArrayList(); for (int i = 0; i < columnLabelStrings.length; i++) { TableColumn column = new TableColumn(headerTable, columnAlignments[i]); column.setMoveable(movable); column.setResizable(resizable); column.setText(columnLabelStrings[i]); this.tableColumns.add(column); column.addControlListener(columnControlListener); column.addSelectionListener(columnSelectionListener); } }
Example 14
Source File: ExportTmxDialog.java From tmxeditor8 with GNU General Public License v2.0 | 3 votes |
/** * 设置TableViewer 列属性 * @param viewer * @param title * 列标题 * @param bound * 列宽 * @param colNumber * 列序号 * @return {@link TableViewerColumn}; */ private TableViewerColumn createTableViewerColumn(TableViewer viewer, String title, int bound, final int colNumber) { final TableViewerColumn viewerColumn = new TableViewerColumn(viewer, SWT.NONE | SWT.Resize); final TableColumn column = viewerColumn.getColumn(); column.setText(title); column.setWidth(bound); column.setResizable(true); column.setMoveable(true); return viewerColumn; }
Example 15
Source File: PreTranslationResultDialog.java From translationstudio8 with GNU General Public License v2.0 | 3 votes |
/** * 设置TableViewer 列属性 * @param viewer * @param title * 列标题 * @param bound * 列宽 * @param colNumber * 列序号 * @return {@link TableViewerColumn}; */ private TableViewerColumn createTableViewerColumn(TableViewer viewer, String title, int bound, final int colNumber) { final TableViewerColumn viewerColumn = new TableViewerColumn(viewer, SWT.NONE | SWT.Resize); final TableColumn column = viewerColumn.getColumn(); column.setText(title); column.setWidth(bound); column.setResizable(true); column.setMoveable(true); return viewerColumn; }
Example 16
Source File: TermDbManagerDialog.java From tmxeditor8 with GNU General Public License v2.0 | 3 votes |
/** * 设置TableViewer 列属性 * @param viewer * @param title * 列标题 * @param bound * 列宽 * @param colNumber * 列序号 * @return {@link TableViewerColumn}; */ private TableViewerColumn createTableViewerColumn(TableViewer viewer, String title, int bound, final int colNumber) { final TableViewerColumn viewerColumn = new TableViewerColumn(viewer, SWT.NONE | SWT.Resize); final TableColumn column = viewerColumn.getColumn(); column.setText(title); column.setWidth(bound); column.setResizable(true); column.setMoveable(true); return viewerColumn; }
Example 17
Source File: PreTranslationResultDialog.java From tmxeditor8 with GNU General Public License v2.0 | 3 votes |
/** * 设置TableViewer 列属性 * @param viewer * @param title * 列标题 * @param bound * 列宽 * @param colNumber * 列序号 * @return {@link TableViewerColumn}; */ private TableViewerColumn createTableViewerColumn(TableViewer viewer, String title, int bound, final int colNumber) { final TableViewerColumn viewerColumn = new TableViewerColumn(viewer, SWT.NONE | SWT.Resize); final TableColumn column = viewerColumn.getColumn(); column.setText(title); column.setWidth(bound); column.setResizable(true); column.setMoveable(true); return viewerColumn; }
Example 18
Source File: PreMachineTranslationDialog.java From translationstudio8 with GNU General Public License v2.0 | 3 votes |
/** * 设置TableViewer 列属性 * @param viewer * @param title * 列标题 * @param bound * 列宽 * @param colNumber * 列序号 * @return {@link TableViewerColumn}; */ private TableViewerColumn createTableViewerColumn(TableViewer viewer, String title, int bound, final int colNumber) { final TableViewerColumn viewerColumn = new TableViewerColumn(viewer, SWT.NONE | SWT.Resize); final TableColumn column = viewerColumn.getColumn(); column.setText(title); column.setWidth(bound); column.setResizable(true); column.setMoveable(true); return viewerColumn; }
Example 19
Source File: ProjectSettingTBPage.java From tmxeditor8 with GNU General Public License v2.0 | 3 votes |
/** * 设置TableViewer 列属性 * @param viewer * @param title * 列标题 * @param bound * 列宽 * @param colNumber * 列序号 * @return {@link TableViewerColumn}; */ private TableViewerColumn createTableViewerColumn(TableViewer viewer, String title, int bound, final int colNumber) { final TableViewerColumn viewerColumn = new TableViewerColumn(viewer, SWT.NONE | SWT.Resize); final TableColumn column = viewerColumn.getColumn(); column.setText(title); column.setWidth(bound); column.setResizable(true); column.setMoveable(true); return viewerColumn; }
Example 20
Source File: PreMachineTranslationResultDialog.java From translationstudio8 with GNU General Public License v2.0 | 3 votes |
/** * 设置TableViewer 列属性 * @param viewer * @param title * 列标题 * @param bound * 列宽 * @param colNumber * 列序号 * @return {@link TableViewerColumn}; */ private TableViewerColumn createTableViewerColumn(TableViewer viewer, String title, int bound, final int colNumber) { final TableViewerColumn viewerColumn = new TableViewerColumn(viewer, SWT.NONE | SWT.Resize); final TableColumn column = viewerColumn.getColumn(); column.setText(title); column.setWidth(bound); column.setResizable(true); column.setMoveable(true); return viewerColumn; }