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


Java Table.setLinesVisible方法代码示例

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


在下文中一共展示了Table.setLinesVisible方法的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: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例9: createViewer

import org.eclipse.swt.widgets.Table; //导入方法依赖的package包/类
private void createViewer(Composite parent) {
	viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER | SWT.CHECK | SWT.READ_ONLY | SWT.PUSH);
	createColumns(parent, viewer);
	final Table table = viewer.getTable();
	table.setHeaderVisible(true);
	table.setLinesVisible(true);

	viewer.getTable().addListener(SWT.Selection, new Listener() {

		@Override
		public void handleEvent(org.eclipse.swt.widgets.Event event) {
			if (highlightNodes.getSelection())
				highlightNodesOnGraph(highlightNodes.getSelection());
		}
	});

	viewer.setContentProvider(new ArrayContentProvider());
	viewer.setInput(this.units);
	getSite().setSelectionProvider(viewer);

	GridData gridData = new GridData();
	gridData.verticalAlignment = GridData.FILL;
	gridData.horizontalSpan = 2;
	gridData.grabExcessHorizontalSpace = true;
	gridData.grabExcessVerticalSpace = true;
	gridData.horizontalAlignment = GridData.FILL;
	viewer.getControl().setLayoutData(gridData);

	Hashtable<String, Object> properties = new Hashtable<>();
	String[] topics = new String[] { DataModel.EA_TOPIC_DATA_SELECTION, DataModel.EA_TOPIC_DATA_UNIT_CHANGED, DataModel.EA_TOPIC_DATA_VIEW_REFRESH };
	properties.put(EventConstants.EVENT_TOPIC, topics);
	ServiceUtil.registerService(EventHandler.class, this, properties);

}
 
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:35,代码来源:ResultView.java

示例10: 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

示例11: 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

示例12: 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

示例13: 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

示例14: createTableColumns

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

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

示例15: createTable

import org.eclipse.swt.widgets.Table; //导入方法依赖的package包/类
protected Table createTable(IManagedForm managedForm, Composite client) {
    FormToolkit toolkit = managedForm.getToolkit();
    Table table = toolkit.createTable(client, getTableStyle());
    table.setLinesVisible(true);
    return table;
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:7,代码来源:BaseZnodeModelTableFormPage.java


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