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


Java Table.setHeaderVisible方法代码示例

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


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

示例1: createViewer

import org.eclipse.swt.widgets.Table; //导入方法依赖的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: createTableSection

import org.eclipse.swt.widgets.Table; //导入方法依赖的package包/类
protected Section createTableSection(ScrolledForm form, Composite client, FormToolkit toolkit, String title,
        Image image, int sectionStyle, int tableStyle, String[] columnTitles, int[] columnAlignments) {

    Section section = createSection(form, client, toolkit, title, image, sectionStyle);
    Table table = toolkit.createTable(section, tableStyle);

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

    table.setHeaderVisible(true);
    table.setLinesVisible(true);

    section.setClient(table);

    return section;
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:20,代码来源:DataModelFormPage.java

示例3: createTableColumns

import org.eclipse.swt.widgets.Table; //导入方法依赖的package包/类
protected void createTableColumns() {
    Table table = getTable();
    if (table == null) {
        return;
    }

    String[] titles = getTableColumnTitles();
    if (titles != null && titles.length > 0) {

        int[] columnAlignments = getTableColumnAlignments();

        for (int i = 0; i < titles.length; i++) {
            TableColumn column = new TableColumn(table, SWT.NONE);
            column.setText(titles[i]);

            if (columnAlignments != null) {
                column.setAlignment(columnAlignments[i]);
            }
        }

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

示例4: createTableColumns

import org.eclipse.swt.widgets.Table; //导入方法依赖的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

示例5: 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);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:18,代码来源:ArrayEditorComposite.java

示例6: 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);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:13,代码来源:XMLTableWizardPage.java

示例7: 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);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:12,代码来源:SqlConnectorComposite.java

示例8: createTableColumns

import org.eclipse.swt.widgets.Table; //导入方法依赖的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: createTableViewer

import org.eclipse.swt.widgets.Table; //导入方法依赖的package包/类
public TableViewer createTableViewer(Composite composite, String[] prop,
		int[] bounds, int columnWidth,
		IStructuredContentProvider iStructuredContentProvider,
		ITableLabelProvider iTableLabelProvider) {
	final TableViewer tableViewer = new TableViewer(composite, SWT.BORDER
			| SWT.MULTI | SWT.FULL_SELECTION | SWT.VIRTUAL);

	Table table = tableViewer.getTable();
	table.setBounds(bounds[0], bounds[1], bounds[2], bounds[3]);
	tableViewer.setContentProvider(iStructuredContentProvider);
	tableViewer.setLabelProvider(iTableLabelProvider);
	tableViewer.setColumnProperties(prop);
	tableViewer.getTable().addTraverseListener(new TraverseListener() {

		@Override
		public void keyTraversed(TraverseEvent e) {
			if (e.keyCode == SWT.ARROW_UP) {
				e.doit = false;
			} else if (e.keyCode == SWT.ARROW_DOWN) {
				e.doit = false;
			} else if (e.keyCode == SWT.TRAVERSE_ARROW_NEXT) {
				e.doit = false;
			} else if (e.keyCode == SWT.TRAVERSE_ARROW_PREVIOUS) {
				e.doit = false;
			}

		}
	});

	table.setVisible(true);
	table.setLinesVisible(true);
	table.setHeaderVisible(true);
	/*
	 * createTableColumns(table,prop, columnWidth); CellEditor[] editors
	 * =createCellEditorList(table,1); tableViewer.setCellEditors(editors);
	 */

	return tableViewer;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:40,代码来源:ELTSWTWidgets.java

示例10: createTableColumns

import org.eclipse.swt.widgets.Table; //导入方法依赖的package包/类
public void createTableColumns(Table table, String[] fields, int width) {
	for (String field : fields) {
		TableColumn tableColumn = new TableColumn(table, SWT.LEFT);
		tableColumn.setText(field);
		tableColumn.setWidth(width);
		// tableColumn.pack();
	}
	table.setHeaderVisible(true);
	table.setLinesVisible(true);

}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:12,代码来源:ELTSWTWidgets.java

示例11: 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);
   }
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:31,代码来源:SchemaPreviewPage.java

示例12: createTableColumns

import org.eclipse.swt.widgets.Table; //导入方法依赖的package包/类
public static void createTableColumns(Table table, String[] fields) {
	for (String field : fields) {
		TableColumn tableColumn = new TableColumn(table, SWT.FILL);
		tableColumn.setText(field);

		tableColumn.setWidth(100);
		tableColumn.pack();
	}
	table.setHeaderVisible(true);
	table.setLinesVisible(true);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:12,代码来源:ELTOperationClassDialog.java

示例13: 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;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:14,代码来源:JoinMapDialog.java

示例14: 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());
		}

	});
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:38,代码来源:SecondaryColumnKeysDialog.java

示例15: createTableColumns

import org.eclipse.swt.widgets.Table; //导入方法依赖的package包/类
public static void createTableColumns(Table table, String[] fields) {
	for (String field : fields) {
		TableColumn tableColumn = new TableColumn(table, SWT.LEFT);
		tableColumn.setText(field);

		tableColumn.setWidth(100);
		tableColumn.pack();
	}
	table.setHeaderVisible(true);
	table.setLinesVisible(true);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:12,代码来源:TransformDialog.java


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