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


Java ColumnWeightData类代码示例

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


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

示例1: applyInitialColWidth

import org.eclipse.jface.viewers.ColumnWeightData; //导入依赖的package包/类
protected void applyInitialColWidth ( final TableLayout tableLayout )
{
    if ( this.initialColWidth != null && !this.initialColWidth.isEmpty () && this.viewer != null && this.initialColWidth.size () != this.viewer.getTree ().getColumnCount () )
    {
        for ( final Integer w : this.initialColWidth )
        {
            tableLayout.addColumnData ( new ColumnPixelData ( w, true ) );
        }
    }
    else
    {
        tableLayout.addColumnData ( new ColumnWeightData ( 200, true ) );
        tableLayout.addColumnData ( new ColumnWeightData ( 100, true ) );
        tableLayout.addColumnData ( new ColumnWeightData ( 100, true ) );
        tableLayout.addColumnData ( new ColumnWeightData ( 200, true ) );
        tableLayout.addColumnData ( new ColumnWeightData ( 200, true ) );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:19,代码来源:RealTimeListViewer.java

示例2: setTableLayoutToMappingTable

import org.eclipse.jface.viewers.ColumnWeightData; //导入依赖的package包/类
private void setTableLayoutToMappingTable(TableViewer tableViewer) {
	TableColumnLayout layout = new TableColumnLayout();
	tableViewer.getControl().getParent().setLayout(layout);

	for (int columnIndex = 0, n = tableViewer.getTable().getColumnCount(); columnIndex < n; columnIndex++) {
		tableViewer.getTable().getColumn(columnIndex).pack();
	}

	for (int i = 0; i < tableViewer.getTable().getColumnCount(); i++) {
		if(tableViewer.getData(TABLE_TYPE_KEY) == null ){
			layout.setColumnData(tableViewer.getTable().getColumn(i),
					new ColumnWeightData(1));	
		}else{
			if(i!=2){
				layout.setColumnData(tableViewer.getTable().getColumn(i),
						new ColumnWeightData(3));	
			}else{
				layout.setColumnData(tableViewer.getTable().getColumn(i),
						new ColumnWeightData(1));	
			}
			
		}
		
	}
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:26,代码来源:MultiParameterFileDialog.java

示例3: addColumns

import org.eclipse.jface.viewers.ColumnWeightData; //导入依赖的package包/类
private void addColumns() {
    // Columns
    final TableLayout mergeTableLayout = new TableLayout();
    table.setLayout(mergeTableLayout);

    mergeTableLayout.addColumnData(new ColumnWeightData(15, 10, true));
    final TableColumn changesetTableColumn = new TableColumn(table, SWT.NONE);
    changesetTableColumn.setText(Messages.getString("SelectChangesetsWizardPage.ColumnNameChangeset")); //$NON-NLS-1$

    mergeTableLayout.addColumnData(new ColumnWeightData(25, 10, true));
    final TableColumn changeTableColumn = new TableColumn(table, SWT.NONE);
    changeTableColumn.setText(Messages.getString("SelectChangesetsWizardPage.ColumnNameDate")); //$NON-NLS-1$

    mergeTableLayout.addColumnData(new ColumnWeightData(15, 10, true));
    final TableColumn userTableColumn = new TableColumn(table, SWT.NONE);
    userTableColumn.setText(Messages.getString("SelectChangesetsWizardPage.ColumnNameUser")); //$NON-NLS-1$

    mergeTableLayout.addColumnData(new ColumnWeightData(35, 10, true));
    final TableColumn commentTableColumn = new TableColumn(table, SWT.FILL);
    commentTableColumn.setText(Messages.getString("SelectChangesetsWizardPage.ColumnNameComment")); //$NON-NLS-1$
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:22,代码来源:SelectChangesetsWizardPage.java

示例4: createTableColumns

import org.eclipse.jface.viewers.ColumnWeightData; //导入依赖的package包/类
private void createTableColumns(final Table table) {
    final TableLayout tableLayout = new TableLayout();
    table.setLayout(tableLayout);

    tableLayout.addColumnData(new ColumnWeightData(5, true));
    final TableColumn column1 = new TableColumn(table, SWT.NONE);
    column1.setText(Messages.getString("BranchesPropertiesControl.ColumNameFileName")); //$NON-NLS-1$
    column1.setResizable(true);

    tableLayout.addColumnData(new ColumnWeightData(3, true));
    final TableColumn column2 = new TableColumn(table, SWT.NONE);
    column2.setText(Messages.getString("BranchesPropertiesControl.ColumnNameChange")); //$NON-NLS-1$
    column2.setResizable(true);

    tableLayout.addColumnData(new ColumnWeightData(1, true));
    final TableColumn column3 = new TableColumn(table, SWT.NONE);
    column3.setText(Messages.getString("BranchesPropertiesControl.ColumnNameBranchedFrom")); //$NON-NLS-1$
    column3.setResizable(true);

}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:21,代码来源:BranchesPropertiesControl.java

示例5: createTableColumns

import org.eclipse.jface.viewers.ColumnWeightData; //导入依赖的package包/类
private void createTableColumns(final Table table) {
    final TableLayout tableLayout = new TableLayout();
    table.setLayout(tableLayout);

    tableLayout.addColumnData(new ColumnWeightData(1, true));
    final TableColumn column1 = new TableColumn(table, SWT.NONE);
    column1.setText(Messages.getString("StatusPropertiesTab.ColumNameUser")); //$NON-NLS-1$
    column1.setResizable(true);

    tableLayout.addColumnData(new ColumnWeightData(1, true));
    final TableColumn column2 = new TableColumn(table, SWT.NONE);
    column2.setText(Messages.getString("StatusPropertiesTab.ChangeNameChangeType")); //$NON-NLS-1$
    column2.setResizable(true);

    tableLayout.addColumnData(new ColumnWeightData(1, true));
    final TableColumn column3 = new TableColumn(table, SWT.NONE);
    column3.setText(Messages.getString("StatusPropertiesTab.ColumnNameWorkspace")); //$NON-NLS-1$
    column3.setResizable(true);
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:20,代码来源:StatusPropertiesTab.java

示例6: createTableColumns

import org.eclipse.jface.viewers.ColumnWeightData; //导入依赖的package包/类
private void createTableColumns(final Table table) {
    final TableLayout tableLayout = new TableLayout();
    table.setLayout(tableLayout);

    tableLayout.addColumnData(new ColumnWeightData(5, true));
    final TableColumn column1 = new TableColumn(table, SWT.NONE);
    column1.setText(Messages.getString("BranchHistoryTreeControl.ColumnHeaderFileName")); //$NON-NLS-1$
    column1.setResizable(true);

    tableLayout.addColumnData(new ColumnWeightData(1, true));
    final TableColumn column2 = new TableColumn(table, SWT.NONE);
    column2.setText(Messages.getString("BranchHistoryTreeControl.ColumnHeaderBranchedFromVersion")); //$NON-NLS-1$
    column2.setResizable(true);

    if (displayLatestVersion) {
        tableLayout.addColumnData(new ColumnWeightData(1, true));
        final TableColumn column3 = new TableColumn(table, SWT.NONE);
        column3.setText(Messages.getString("BranchHistoryTreeControl.ColumnHeaderLatestVersion")); //$NON-NLS-1$
        column3.setResizable(true);
    }
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:22,代码来源:BranchHistoryTreeControl.java

示例7: createTable

import org.eclipse.jface.viewers.ColumnWeightData; //导入依赖的package包/类
protected TableViewer createTable(Composite parent, int span) {
	Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
	GridData data = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL);
	data.horizontalSpan = span;
	data.heightHint = 125;
	table.setLayoutData(data);
	TableLayout layout = new TableLayout();
	layout.addColumnData(new ColumnWeightData(100, true));
	table.setLayout(layout);
	TableColumn col = new TableColumn(table, SWT.NONE);
	col.setResizable(true);
	col.setText(Policy.bind("SVNFoldersExistWarningPage.folders")); //$NON-NLS-1$
	table.setHeaderVisible(true);

	return new TableViewer(table);
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:17,代码来源:SvnFoldersExistWarningPage.java

示例8: createTableViewer

import org.eclipse.jface.viewers.ColumnWeightData; //导入依赖的package包/类
private TableViewer createTableViewer(Composite parent, String[] columnNames, int[] columnWeights) {
	Composite container = new Composite(parent, SWT.NONE);
	GridDataFactory.fillDefaults().grab(true, true).hint(600, 200).applyTo(container);
	TableColumnLayout layout = new TableColumnLayout();
	container.setLayout(layout);

	Table table = new Table(container, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI);
	table.setHeaderVisible(true);

	for (int i = 0; i < columnNames.length; i++) {
		TableColumn column = new TableColumn(table, SWT.NONE);
		column.setText(columnNames[i]);
		layout.setColumnData(column, new ColumnWeightData(columnWeights[i]));
	}

	TableViewer tableViewer = new TableViewer(table);
	tableViewer.setColumnProperties(columnNames);
	return tableViewer;
}
 
开发者ID:eclipse,项目名称:cft,代码行数:20,代码来源:ManageCloudDialog.java

示例9: createColumns

import org.eclipse.jface.viewers.ColumnWeightData; //导入依赖的package包/类
private void createColumns(Table table)
  {
E [] columns = columnEnumClass.getEnumConstants();


      TableColumnLayout tableLayout = new TableColumnLayout();
this.setLayout(tableLayout);

for (int i = 0; i < columns.length; i++) {
	E column = columns[i];
       createTableViewerColumn(column.getTitle(), column.getPercentage(), column.getColumnIndex());				
	TableColumn tableColumn = table.getColumn(column.getColumnIndex());
	tableColumn.pack();
	tableLayout.setColumnData(tableColumn, new ColumnWeightData(column.getPercentage(), table.getColumn(0).getWidth()));
	
}
  }
 
开发者ID:scauwe,项目名称:IDM-Enh-Trace,代码行数:18,代码来源:AbstractTraceComposite.java

示例10: createTableViewerColumn

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

示例11: createTableViewerColumn

import org.eclipse.jface.viewers.ColumnWeightData; //导入依赖的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, 20,
			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,代码行数:20,代码来源:ObjectDumpFileListView.java

示例12: createTableViewerColumn

import org.eclipse.jface.viewers.ColumnWeightData; //导入依赖的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,代码来源:LoginUserView.java

示例13: createTableViewerColumn

import org.eclipse.jface.viewers.ColumnWeightData; //导入依赖的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, 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,代码来源:HeapHistoView.java

示例14: createTableViewerColumn

import org.eclipse.jface.viewers.ColumnWeightData; //导入依赖的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, 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,代码行数:19,代码来源:ObjectFileSocketView.java

示例15: createTableViewerColumn

import org.eclipse.jface.viewers.ColumnWeightData; //导入依赖的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();
			TableColumn selectedColumn = (TableColumn) e.widget;
			sorter.setColumn(selectedColumn);
		}
	});
	return viewerColumn;
}
 
开发者ID:scouter-project,项目名称:scouter,代码行数:18,代码来源:ServerEnvView.java


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