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


Java TableColumn.setMoveable方法代码示例

本文整理汇总了Java中org.eclipse.swt.widgets.TableColumn.setMoveable方法的典型用法代码示例。如果您正苦于以下问题:Java TableColumn.setMoveable方法的具体用法?Java TableColumn.setMoveable怎么用?Java TableColumn.setMoveable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.swt.widgets.TableColumn的用法示例。


在下文中一共展示了TableColumn.setMoveable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createViewer

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
@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;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:22,代码来源:TableViewerBuilder.java

示例2: createColumns

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
private void createColumns(final TableViewer tableViewer) {
  final String[] titles = { "Icon", "Name", "Small", "Medium", "Large", "Source", "Class" };
  final int[] bounds = { 40, 200, 60, 60, 60, 200, 200 };
  for (int i = 0; i < titles.length; i++) {
    final TableViewerColumn viewerColumn = new TableViewerColumn(tableViewer, SWT.NONE);
    tableViewer.setSorter(new TableViewerSorter(titles));
    viewerColumn.setLabelProvider(new TableCellLabelProvider());
    final TableColumn column = viewerColumn.getColumn();
    column.addSelectionListener(new ColumnSelectionListener(column, tableViewer));
    column.setText(titles[i]);
    column.setWidth(bounds[i]);
    column.setResizable(true);
    column.setMoveable(false);
  }
  final Table table = tableViewer.getTable();
  table.setHeaderVisible(true);
  table.setLinesVisible(true);
  ColumnViewerToolTipSupport.enableFor(tableViewer, ToolTip.RECREATE);
}
 
开发者ID:AndreasWBartels,项目名称:libraries,代码行数:20,代码来源:TableViewerFactory.java

示例3: createColumns

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
private void createColumns(final TableViewer tableViewer) {
  final String[] titles = { "Relation", "Type", "Name" };
  final int[] bounds = { 120, 100, 200 };
  for (int i = 0; i < titles.length; i++) {
    final TableViewerColumn viewerColumn = new TableViewerColumn(tableViewer, SWT.NONE);
    tableViewer.setSorter(new TableViewerSorter(titles));
    viewerColumn.setLabelProvider(new TableCellLabelProvider());
    final TableColumn column = viewerColumn.getColumn();
    column.addSelectionListener(new ColumnSelectionListener(column, tableViewer));
    column.setText(titles[i]);
    column.setWidth(bounds[i]);
    column.setResizable(true);
    column.setMoveable(false);
  }
  final Table table = tableViewer.getTable();
  table.setHeaderVisible(true);
  table.setLinesVisible(true);
  ColumnViewerToolTipSupport.enableFor(tableViewer, ToolTip.RECREATE);

  // Object[] projectsToSelect = openProjects.toArray();
  // IViewPart view = window.getActivePage().showView( "org.eclipse.jdt.ui.PackageExplorer" );
  // view.getSite().getSelectionProvider().setSelection( new StructuredSelection( projectsToSelect ) );

}
 
开发者ID:AndreasWBartels,项目名称:libraries,代码行数:25,代码来源:RelationsTableViewerFactory.java

示例4: createColumns

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
private void createColumns(final TableViewer tableViewer) {
  final String[] titles = { "Class" };
  final int[] bounds = { 120, 100, 200 };
  for (int i = 0; i < titles.length; i++) {
    final TableViewerColumn viewerColumn = new TableViewerColumn(tableViewer, SWT.NONE);
    tableViewer.setSorter(new TableViewerSorter(titles));
    viewerColumn.setLabelProvider(new TableCellLabelProvider());
    final TableColumn column = viewerColumn.getColumn();
    column.addSelectionListener(new ColumnSelectionListener(column, tableViewer));
    column.setText(titles[i]);
    column.setWidth(bounds[i]);
    column.setResizable(true);
    column.setMoveable(false);
  }
  final Table table = tableViewer.getTable();
  table.setHeaderVisible(true);
  table.setLinesVisible(true);
  ColumnViewerToolTipSupport.enableFor(tableViewer, ToolTip.RECREATE);
}
 
开发者ID:AndreasWBartels,项目名称:libraries,代码行数:20,代码来源:TypesTableViewerFactory.java

示例5: defineColumnsInternal

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
/**
 * 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);
		}
	}
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:32,代码来源:MyTableCombo.java

示例6: createColumn

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
private void createColumn(int idx, int align) {
	TableViewerColumn viewerColumn = new TableViewerColumn(viewer, align, idx);
	viewerColumn.setEditingSupport(new TableEditingSupport(viewer, idx));
	viewerColumn.setLabelProvider(new ColumnLabelProvider() {

		private int col = idx;

		public String getText(Object element) {
			if (element instanceof Row) {
				return ((Row) element).data[col];
			}
			return super.getText(element);
		}
	});

	TableColumn column = viewerColumn.getColumn();
	column.setResizable(true);
	column.setMoveable(true);

	column.setText(tableModel.headers[idx]);

	int width = convertWidthInCharsToPixels(tableModel.colWidths[idx]);
	width = Math.max(width, 50);
	column.setWidth(width);
}
 
开发者ID:grosenberg,项目名称:fluentmark,代码行数:26,代码来源:TableDialog.java

示例7: createTableColumns

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
private static void createTableColumns(Table table, IElementType tableElementType) {

        String[] columnTitles = tableElementType.getColumnTitles();
        int[] columnAlignments = tableElementType.getColumnAlignments();

        for (int i = 0; i < columnTitles.length; i++) {
            TableColumn column = new TableColumn(table, SWT.NONE);
            column.setText(columnTitles[i]);
            column.setAlignment(columnAlignments[i]);
            column.setMoveable(true);
        }

        table.setHeaderVisible(true);
    }
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:15,代码来源:ViewerFactory.java

示例8: createTableColumns

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
/**
 * Creates the table columns.
 * 
 * @param table
 *            the table
 * @param fields
 *            the fields
 */
public static void createTableColumns(Table table,String[] fields){
	for (String field : fields) {
		TableColumn tc = new TableColumn(table, SWT.CENTER);
		tc.setText(field);
		tc.setMoveable(true);
	}
	table.setHeaderVisible(true);
	table.setLinesVisible(true);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:18,代码来源:WidgetUtility.java

示例9: addColumnTo

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
public TableViewerColumn addColumnTo(TableViewer viewer) {
  TableViewerColumn tableViewerColumn = new TableViewerColumn(viewer, SWT.NONE);
  TableColumn column = tableViewerColumn.getColumn();
  column.setMoveable(true);
  column.setText(getTitle());
  column.setResizable(true);
  tableViewerColumn.setLabelProvider(this);
  return tableViewerColumn;
}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:10,代码来源:RefColumnLabelProvider.java

示例10: createTableViewerColumn

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
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;
}
 
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:10,代码来源:ResultView.java

示例11: createTableViewerColumn

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
/**
 * Helper method to create table columns
 * 
 * @param tblVwrSetup
 * @param title
 * @param bound
 * @return
 */
private TableViewerColumn createTableViewerColumn(final TableViewer tblVwrSetup, String title, int bound) {
	final TableViewerColumn viewerColumn = new TableViewerColumn(tblVwrSetup, SWT.NONE);
	final TableColumn column = viewerColumn.getColumn();
	column.setText(title);
	column.setWidth(bound);
	column.setResizable(true);
	column.setMoveable(false);
	column.setAlignment(SWT.LEFT);
	return viewerColumn;
}
 
开发者ID:Pardus-LiderAhenk,项目名称:lider-ahenk-installer,代码行数:19,代码来源:AhenkNetworkScanPage.java

示例12: createColumn

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
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;
}
 
开发者ID:JorisAerts,项目名称:Eclipse-Environment-Variables,代码行数:8,代码来源:EnvironmentVariablesTable.java

示例13: createTableViewerColumn

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
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;
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:12,代码来源:ModelSortPageableTableExample.java

示例14: createTableViewerColumn

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
public static TableViewerColumn createTableViewerColumn(TableViewer viewer, int style, String text, int width) {
		TableViewerColumn tvc = new TableViewerColumn(viewer, style);
//		TableColumn col = new TableColumn(viewer.getTable(), style);
		TableColumn col = tvc.getColumn();
		col.setText(text);
		col.setWidth(width);
		col.setResizable(true);
		col.setMoveable(true);
		
		return tvc;
	}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:12,代码来源:TableViewerUtils.java

示例15: createTableViewerColumn

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
private TableViewerColumn createTableViewerColumn(final String title, final int colNumber) {
	final TableViewerColumn viewerColumn = new TableViewerColumn(tableViewer, SWT.NONE);
	final TableColumn column = viewerColumn.getColumn();
	column.setText(title);
	column.setResizable(true);
	column.setMoveable(true);
	column.addSelectionListener(createSelectionAdapter(column, colNumber));
	return viewerColumn;
}
 
开发者ID:Albertus82,项目名称:EarthquakeBulletin,代码行数:10,代码来源:ResultsTable.java


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