當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。