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


Java TableViewerColumn.getColumn方法代码示例

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


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

示例1: createViewer

import org.eclipse.jface.viewers.TableViewerColumn; //导入方法依赖的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: createSourceTable

import org.eclipse.jface.viewers.TableViewerColumn; //导入方法依赖的package包/类
private void createSourceTable(SashForm sashForm) {
    avaliableFieldTableViewer = new TableViewer(sashForm, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
	table_1 = avaliableFieldTableViewer.getTable();
	table_1.setLinesVisible(true);
	table_1.setHeaderVisible(true);
	avaliableFieldTableViewer.setContentProvider(new IStructuredContentProvider() {

		@Override
		public Object[] getElements(Object inputElement) {
			return ((List) inputElement).toArray();
		}
	});
	avaliableFieldTableViewer.setInput(schemaFields);

	TableViewerColumn tableViewerColumn_2 = new TableViewerColumn(avaliableFieldTableViewer, SWT.NONE);
	TableColumn tblclmnNewColumn_2 = tableViewerColumn_2.getColumn();
	tblclmnNewColumn_2.setWidth(196);
	tblclmnNewColumn_2.setText(Messages.AVAILABLE_FIELDS_HEADER);
	tableViewerColumn_2.setLabelProvider(new ColumnLabelProvider());

	attachDragListener();
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:23,代码来源:ExcelFormattingDialog.java

示例3: createTableColumns

import org.eclipse.jface.viewers.TableViewerColumn; //导入方法依赖的package包/类
private TableViewer createTableColumns(Composite tableComposite) {
	TableViewer tableViewer = new TableViewer(tableComposite, SWT.BORDER | SWT.FULL_SELECTION);
	excelFormatterTable = tableViewer.getTable();
	excelFormatterTable.setHeaderVisible(true);
	excelFormatterTable.setLinesVisible(true);
	excelFormatterTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

	TableViewerColumn tableViewerColumn = new TableViewerColumn(tableViewer, SWT.NONE);
	TableColumn parameterNameColumn = tableViewerColumn.getColumn();
	parameterNameColumn.setWidth(254);
	parameterNameColumn.setText(Messages.PARAMETER_NAME);
	tableViewerColumn.setLabelProvider(new ParameterNameLabelProvider());

	TableViewerColumn tableViewerColumn_1 = new TableViewerColumn(tableViewer, SWT.NONE);
	TableColumn parameterValueColumn = tableViewerColumn_1.getColumn();
	parameterValueColumn.setWidth(251);
	parameterValueColumn.setText(Messages.PARAMETER_VALUE);
	tableViewerColumn_1.setLabelProvider(new ParameterValueLabelProvider());
	return tableViewer;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:21,代码来源:HeaderAndDataFormattingDialog.java

示例4: createColumns

import org.eclipse.jface.viewers.TableViewerColumn; //导入方法依赖的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

示例5: createColumns

import org.eclipse.jface.viewers.TableViewerColumn; //导入方法依赖的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

示例6: createColumns

import org.eclipse.jface.viewers.TableViewerColumn; //导入方法依赖的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

示例7: createColumn

import org.eclipse.jface.viewers.TableViewerColumn; //导入方法依赖的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

示例8: createTableViewerColumn

import org.eclipse.jface.viewers.TableViewerColumn; //导入方法依赖的package包/类
protected TableViewerColumn createTableViewerColumn(String title, int width, int alignment, final boolean isNumber) {
	final TableViewerColumn viewerColumn = new TableViewerColumn(viewer, SWT.NONE);
	final TableColumn column = viewerColumn.getColumn();
	column.setText(title);
	column.setAlignment(alignment);
	column.setMoveable(true);
	tableColumnLayout.setColumnData(column, new ColumnPixelData(width, true));
	column.setData("isNumber", isNumber);
	column.addSelectionListener(new SelectionAdapter() {
		public void widgetSelected(SelectionEvent e) {
			ColumnLabelSorter sorter = (ColumnLabelSorter) viewer.getComparator();
			TableColumn selectedColumn = (TableColumn) e.widget;
			sorter.setColumn(selectedColumn);
		}
	});
	return viewerColumn;
}
 
开发者ID:scouter-project,项目名称:scouter,代码行数:18,代码来源:XLogSummaryAbstractDialog.java

示例9: createTableViewerColumn

import org.eclipse.jface.viewers.TableViewerColumn; //导入方法依赖的package包/类
private TableViewerColumn createTableViewerColumn(String title, int width, int alignment,  boolean resizable, boolean moveable, final boolean isNumber) {
	final TableViewerColumn viewerColumn = new TableViewerColumn(viewer, SWT.NONE);
	final TableColumn column = viewerColumn.getColumn();
	column.setText(title);
	column.setAlignment(alignment);
	column.setMoveable(moveable);
	tableColumnLayout.setColumnData(column, new ColumnWeightData(width, 10, resizable));
	column.setData("isNumber", isNumber);
	column.addSelectionListener(new SelectionAdapter() {
		public void widgetSelected(SelectionEvent e) {
			ColumnLabelSorter sorter = (ColumnLabelSorter) viewer.getComparator();
			TableColumn selectedColumn = (TableColumn) e.widget;
			sorter.setColumn(selectedColumn);
		}
	});
	return viewerColumn;
}
 
开发者ID:scouter-project,项目名称:scouter,代码行数:18,代码来源:AccountListView.java

示例10: defineColumn_Description

import org.eclipse.jface.viewers.TableViewerColumn; //导入方法依赖的package包/类
/**
 * Column: Description
 */
private void defineColumn_Description(final TableColumnLayout tableLayout) {

	final TableViewerColumn tvc = new TableViewerColumn(_markerViewer, SWT.CENTER);
	final TableColumn tc = tvc.getColumn();

	tc.setText(Messages.Tour_Marker_Column_Description_ShortCut);
	tc.setToolTipText(Messages.Tour_Marker_Column_Description_Tooltip);
	tvc.setLabelProvider(new CellLabelProvider() {

		@Override
		public void update(final ViewerCell cell) {

			final TourMarker tourMarker = (TourMarker) cell.getElement();
			final String description = tourMarker.getDescription();

			cell.setText(description.length() == 0 ? UI.EMPTY_STRING : UI.SYMBOL_STAR);
		}
	});
	tableLayout.setColumnData(tc, new ColumnPixelData(_pc.convertWidthInCharsToPixels(4), false));
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:24,代码来源:DialogMarker.java

示例11: createTableViewerColumn

import org.eclipse.jface.viewers.TableViewerColumn; //导入方法依赖的package包/类
private TableViewerColumn createTableViewerColumn(String title, int width, int alignment,  boolean resizable, boolean moveable, final boolean isNumber) {
	final TableViewerColumn viewerColumn = new TableViewerColumn(viewer, SWT.NONE);
	final TableColumn column = viewerColumn.getColumn();
	column.setText(title);
	column.setAlignment(alignment);
	column.setMoveable(moveable);
	tableColumnLayout.setColumnData(column, new ColumnWeightData(30, width, resizable));
	column.setData("isNumber", isNumber);
	column.addSelectionListener(new SelectionAdapter() {
		public void widgetSelected(SelectionEvent e) {
			ColumnLabelSorter sorter = (ColumnLabelSorter) viewer.getComparator();
			sorter.setColumn(column);
		}
	});
	return viewerColumn;
}
 
开发者ID:scouter-project,项目名称:scouter,代码行数:17,代码来源:TopView.java

示例12: createTableViewerColumn

import org.eclipse.jface.viewers.TableViewerColumn; //导入方法依赖的package包/类
private TableViewerColumn createTableViewerColumn(String title, int width, int alignment,  boolean resizable, boolean moveable, final boolean isNumber) {
	final TableViewerColumn viewerColumn = new TableViewerColumn(tableViewer, SWT.NONE);
	final TableColumn column = viewerColumn.getColumn();
	column.setText(title);
	column.setAlignment(alignment);
	column.setMoveable(moveable);
	tableColumnLayout.setColumnData(column, new ColumnWeightData(width, width, resizable));
	column.setData("isNumber", isNumber);
	column.addSelectionListener(new SelectionAdapter() {
		public void widgetSelected(SelectionEvent e) {
			TableLabelSorter sorter = (TableLabelSorter) tableViewer.getComparator();
			TableColumn selectedColumn = (TableColumn) e.widget;
			sorter.setColumn(selectedColumn);
		}
	});
	return viewerColumn;
}
 
开发者ID:scouter-project,项目名称:scouter,代码行数:18,代码来源:ObjectBatchActiveListView.java

示例13: createTableViewerColumn

import org.eclipse.jface.viewers.TableViewerColumn; //导入方法依赖的package包/类
protected TableViewerColumn createTableViewerColumn(String title, int width, int alignment,  boolean resizable, boolean moveable, final boolean isNumber) {
	final TableViewerColumn viewerColumn = new TableViewerColumn(viewer, SWT.NONE);
	final TableColumn column = viewerColumn.getColumn();
	column.setText(title);
	column.setAlignment(alignment);
	column.setMoveable(moveable);
	tableColumnLayout.setColumnData(column, new ColumnWeightData(30, width, resizable));
	column.setData("isNumber", isNumber);
	column.addSelectionListener(new SelectionAdapter() {
		public void widgetSelected(SelectionEvent e) {
			ColumnLabelSorter sorter = (ColumnLabelSorter) viewer.getComparator();
			TableColumn selectedColumn = (TableColumn) e.widget;
			sorter.setColumn(selectedColumn);
		}
	});
	return viewerColumn;
}
 
开发者ID:scouter-project,项目名称:scouter,代码行数:18,代码来源:AbstractSummaryComposite.java

示例14: defineColumn_OffsetY

import org.eclipse.jface.viewers.TableViewerColumn; //导入方法依赖的package包/类
/**
 * column: vertical offset
 */
private void defineColumn_OffsetY(final TableColumnLayout tableLayout) {

	final TableViewerColumn tvc = new TableViewerColumn(_markerViewer, SWT.TRAIL);
	final TableColumn tc = tvc.getColumn();

	tc.setText(Messages.Tour_Marker_Column_vertical_offset);
	tc.setToolTipText(Messages.Tour_Marker_Column_vertical_offset_tooltip);
	tvc.setLabelProvider(new CellLabelProvider() {

		@Override
		public void update(final ViewerCell cell) {

			final TourMarker tourMarker = (TourMarker) cell.getElement();
			cell.setText(Integer.toString(tourMarker.getLabelYOffset()));
		}
	});
	tableLayout.setColumnData(tc, new ColumnPixelData(_pc.convertWidthInCharsToPixels(6), false));
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:22,代码来源:DialogMarker.java

示例15: createTableViewerColumn

import org.eclipse.jface.viewers.TableViewerColumn; //导入方法依赖的package包/类
private TableViewerColumn createTableViewerColumn(String title, int width, int alignment,  boolean resizable, boolean moveable, final boolean isNumber) {
	final TableViewerColumn viewerColumn = new TableViewerColumn(tableViewer, SWT.NONE);
	final TableColumn column = viewerColumn.getColumn();
	column.setText(title);
	column.setAlignment(alignment);
	column.setMoveable(moveable);
	tableColumnLayout.setColumnData(column, new ColumnWeightData(width, width, resizable));
	column.setData("isNumber", isNumber);
	column.addSelectionListener(new SelectionAdapter() {
		public void widgetSelected(SelectionEvent e) {
			ColumnLabelSorter sorter = (ColumnLabelSorter) tableViewer.getComparator();
			TableColumn selectedColumn = (TableColumn) e.widget;
			sorter.setColumn(selectedColumn);
		}
	});
	return viewerColumn;
}
 
开发者ID:scouter-project,项目名称:scouter,代码行数:18,代码来源:ObjectClassListView.java


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