本文整理匯總了Java中org.eclipse.jface.viewers.TableLayout.addColumnData方法的典型用法代碼示例。如果您正苦於以下問題:Java TableLayout.addColumnData方法的具體用法?Java TableLayout.addColumnData怎麽用?Java TableLayout.addColumnData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.jface.viewers.TableLayout
的用法示例。
在下文中一共展示了TableLayout.addColumnData方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: applyInitialColWidth
import org.eclipse.jface.viewers.TableLayout; //導入方法依賴的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 ) );
}
}
示例2: addColumns
import org.eclipse.jface.viewers.TableLayout; //導入方法依賴的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$
}
示例3: createTableColumns
import org.eclipse.jface.viewers.TableLayout; //導入方法依賴的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);
}
示例4: createTableColumns
import org.eclipse.jface.viewers.TableLayout; //導入方法依賴的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);
}
示例5: createTableColumns
import org.eclipse.jface.viewers.TableLayout; //導入方法依賴的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);
}
}
示例6: createTable
import org.eclipse.jface.viewers.TableLayout; //導入方法依賴的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);
}
示例7: createColumns
import org.eclipse.jface.viewers.TableLayout; //導入方法依賴的package包/類
/**
* Method createColumns.
* @param table
* @param layout
* @param viewer
*/
private void createColumns(Table table, TableLayout layout) {
TableColumn col;
// name
col = new TableColumn(table, SWT.NONE);
col.setResizable(false);
layout.addColumnData(new ColumnWeightData(1, true));
// name
col = new TableColumn(table, SWT.NONE);
col.setResizable(true);
col.setText(Policy.bind("SvnPropertiesView.propertyName")); //$NON-NLS-1$
layout.addColumnData(new ColumnWeightData(60, true));
// value
col = new TableColumn(table, SWT.NONE);
col.setResizable(true);
col.setText(Policy.bind("SvnPropertiesView.propertyValue")); //$NON-NLS-1$
layout.addColumnData(new ColumnWeightData(120, true));
}
示例8: buildTable
import org.eclipse.jface.viewers.TableLayout; //導入方法依賴的package包/類
private void buildTable(Composite composite) {
table = new Table(composite, SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION);
GridData gd = new GridData(GridData.FILL_BOTH);
gd.minimumHeight = 200;
table.setLayoutData(gd);
table.setHeaderVisible(true);
table.setLinesVisible(true);
tableViewer = new TableViewer(table);
attachContentProvider(tableViewer);
attachLabelProvider(tableViewer);
attachCellEditors(tableViewer, table);
TableLayout tlayout = new TableLayout();
tlayout.addColumnData(new ColumnWeightData(50));
table.setLayout(tlayout);
TableColumn[] column = new TableColumn[1];
column[0] = new TableColumn(table, SWT.NONE);
column[0].setText(Messages.QueryVisibleColumnsTable_1);
for (int i = 0, n = column.length; i < n; i++)
column[i].pack();
}
示例9: buildTable
import org.eclipse.jface.viewers.TableLayout; //導入方法依賴的package包/類
private void buildTable(Composite composite) {
table = new Table(composite, SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION | SWT.V_SCROLL);
table.setHeaderVisible(true);
tableViewer = new TableViewer(table);
tableViewer.setContentProvider(new ListContentProvider());
tableViewer.setLabelProvider(new TableLabelProvider());
// attachCellEditors(tableViewer, table);
TableLayout tlayout = new TableLayout();
tlayout.addColumnData(new ColumnWeightData(50, 75, true));
table.setLayout(tlayout);
TableColumn[] column = new TableColumn[1];
column[0] = new TableColumn(table, SWT.NONE);
column[0].setText("Locale");
for (int i = 0, n = column.length; i < n; i++)
column[i].pack();
fillTable(table);
}
示例10: buildTable
import org.eclipse.jface.viewers.TableLayout; //導入方法依賴的package包/類
private void buildTable(Composite composite) {
table = new Table(composite, SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION);
GridData gd = new GridData(GridData.FILL_BOTH);
gd.heightHint = 200;
gd.widthHint = 580;
table.setLayoutData(gd);
table.setHeaderVisible(true);
table.setLinesVisible(true);
tableViewer = new TableViewer(table);
attachContentProvider(tableViewer);
attachLabelProvider(tableViewer);
attachCellEditors(tableViewer, table);
TableLayout tlayout = new TableLayout();
tlayout.addColumnData(new ColumnWeightData(100));
table.setLayout(tlayout);
TableColumn[] column = new TableColumn[1];
column[0] = new TableColumn(table, SWT.NONE);
column[0].setText("Color");
for (int i = 0, n = column.length; i < n; i++)
column[i].pack();
}
示例11: buildTable
import org.eclipse.jface.viewers.TableLayout; //導入方法依賴的package包/類
private void buildTable(Composite composite) {
table = new Table(composite, SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION);
GridData gd = new GridData(GridData.FILL_BOTH);
gd.heightHint = 350;
gd.widthHint = 300;
table.setLayoutData(gd);
table.setToolTipText(""); //$NON-NLS-1$
table.setHeaderVisible(true);
table.setLinesVisible(true);
tableViewer = new TableViewer(table);
attachContentProvider(tableViewer);
attachLabelProvider(tableViewer);
attachCellEditors(tableViewer, table);
TableLayout tlayout = new TableLayout();
tlayout.addColumnData(new ColumnWeightData(100));
table.setLayout(tlayout);
TableColumn[] column = new TableColumn[1];
column[0] = new TableColumn(table, SWT.NONE);
column[0].setText(Messages.SeriesDialog_4);
for (int i = 0, n = column.length; i < n; i++)
column[i].pack();
}
示例12: createColumns
import org.eclipse.jface.viewers.TableLayout; //導入方法依賴的package包/類
@Override
protected void createColumns() {
TableColumn[] col = new TableColumn[2];
col[0] = new TableColumn(rightTable, SWT.NONE);
col[0].setText(Messages.common_fields);
col[0].pack();
col[1] = new TableColumn(rightTable, SWT.NONE);
col[1].setText(Messages.common_calculation);
col[1].pack();
TableLayout tlayout = new TableLayout();
tlayout.addColumnData(new ColumnWeightData(50, false));
tlayout.addColumnData(new ColumnWeightData(50, false));
rightTable.setLayout(tlayout);
}
示例13: createColumns
import org.eclipse.jface.viewers.TableLayout; //導入方法依賴的package包/類
@Override
protected void createColumns() {
TableColumn[] col = new TableColumn[4];
col[0] = new TableColumn(rightTable, SWT.NONE);
col[0].setText(Messages.common_fields);
col[0].pack();
col[1] = new TableColumn(rightTable, SWT.NONE);
col[1].setText(Messages.common_order);
col[1].pack();
col[2] = new TableColumn(rightTable, SWT.NONE);
col[2].setText(Messages.common_total_position);
col[2].pack();
col[3] = new TableColumn(rightTable, SWT.NONE);
col[3].setText(Messages.common_calculation);
col[3].pack();
TableLayout tlayout = new TableLayout();
tlayout.addColumnData(new ColumnWeightData(30, false));
tlayout.addColumnData(new ColumnWeightData(20, false));
tlayout.addColumnData(new ColumnWeightData(20, false));
tlayout.addColumnData(new ColumnWeightData(30, false));
rightTable.setLayout(tlayout);
}
示例14: buildTable
import org.eclipse.jface.viewers.TableLayout; //導入方法依賴的package包/類
private void buildTable(Composite composite) {
table = new Table(composite, SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION | SWT.V_SCROLL);
table.setHeaderVisible(true);
tableViewer = new TableViewer(table);
tableViewer.setContentProvider(new ListContentProvider());
tableViewer.setLabelProvider(new TLabelProvider());
attachCellEditors(tableViewer, table);
TableLayout tlayout = new TableLayout();
tlayout.addColumnData(new ColumnWeightData(50, 75, true));
tlayout.addColumnData(new ColumnWeightData(50, 75, true));
table.setLayout(tlayout);
TableColumn[] column = new TableColumn[2];
column[0] = new TableColumn(table, SWT.NONE);
column[0].setText(Messages.common_name);
column[1] = new TableColumn(table, SWT.NONE);
column[1].setText(Messages.common_expression);
for (int i = 0, n = column.length; i < n; i++)
column[i].pack();
fillTable(table);
}
示例15: createColumns
import org.eclipse.jface.viewers.TableLayout; //導入方法依賴的package包/類
/**
* Method createColumns.
* @param table
* @param layout
* @param viewer
*/
private void createColumns(Table table, TableLayout layout) {
TableColumn col;
// name
col = new TableColumn(table, SWT.NONE);
col.setResizable(false);
layout.addColumnData(new ColumnWeightData(1, true));
// name
col = new TableColumn(table, SWT.NONE);
col.setResizable(true);
col.setText(Policy.bind("SvnPropertiesView.propertyName")); //$NON-NLS-1$
layout.addColumnData(new ColumnWeightData(60, true));
// value
col = new TableColumn(table, SWT.NONE);
col.setResizable(true);
col.setText(Policy.bind("SvnPropertiesView.propertyValue")); //$NON-NLS-1$
layout.addColumnData(new ColumnWeightData(120, true));
}